From 5bdf993ab809dafb348c88b99b3c2401476885487fac13bd7a38f7e1722dbebc Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 17 Jan 2024 07:21:54 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-17-openjdk?expand=0&rev=122 --- fips.patch | 29 ++++++++++++++++------------- java-17-openjdk.spec | 6 +++--- jdk-17.0.10+7.tar.gz | 3 +++ jdk-17.0.9+9.tar.gz | 3 --- 4 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 jdk-17.0.10+7.tar.gz delete mode 100644 jdk-17.0.9+9.tar.gz diff --git a/fips.patch b/fips.patch index 32db786..19f6b08 100644 --- a/fips.patch +++ b/fips.patch @@ -2408,29 +2408,32 @@ private static final long serialVersionUID = -2575874101938349339L; private static final String PUBLIC = "public"; -@@ -140,8 +145,7 @@ abstract class P11Key implements Key, Length { +@@ -139,9 +144,7 @@ abstract class P11Key implements Key, Length { + this.tokenObject = tokenObject; this.sensitive = sensitive; this.extractable = extractable; - char[] tokenLabel = this.token.tokenInfo.label; +- char[] tokenLabel = this.token.tokenInfo.label; - isNSS = (tokenLabel[0] == 'N' && tokenLabel[1] == 'S' - && tokenLabel[2] == 'S'); + isNSS = P11Util.isNSS(this.token); boolean extractKeyInfo = (!DISABLE_NATIVE_KEYS_EXTRACTION && isNSS && extractable && !tokenObject); this.keyIDHolder = new NativeKeyHolder(this, keyID, session, -@@ -383,7 +387,9 @@ abstract class P11Key implements Key, Length { - new CK_ATTRIBUTE(CKA_SENSITIVE), - new CK_ATTRIBUTE(CKA_EXTRACTABLE), +@@ -395,8 +398,10 @@ abstract class P11Key implements Key, Length { + new CK_ATTRIBUTE(CKA_EXTRACTABLE), }); -- if (attributes[1].getBoolean() || (attributes[2].getBoolean() == false)) { + +- boolean keySensitive = (attrs[0].getBoolean() || +- attrs[1].getBoolean() || !attrs[2].getBoolean()); + boolean exportable = plainKeySupportEnabled && !algorithm.equals("DH"); -+ if (!exportable && (attributes[1].getBoolean() || -+ (attributes[2].getBoolean() == false))) { - return new P11PrivateKey - (session, keyID, algorithm, keyLength, attributes); - } else { -@@ -465,7 +471,8 @@ abstract class P11Key implements Key, Length { - } ++ boolean keySensitive = (!exportable && ++ (attrs[0].getBoolean() || ++ attrs[1].getBoolean() || !attrs[2].getBoolean())); + + switch (algorithm) { + case "RSA": +@@ -451,7 +456,8 @@ abstract class P11Key implements Key, Length { + public String getFormat() { token.ensureValid(); - if (sensitive || !extractable || (isNSS && tokenObject)) { diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index dac804d..f1ccabd 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,8 +33,8 @@ # Standard JPackage naming and versioning defines. %global featurever 17 %global interimver 0 -%global updatever 9 -%global buildver 9 +%global updatever 10 +%global buildver 7 %global openjdk_repo jdk17u %global openjdk_tag jdk-%{featurever}.%{interimver}.%{updatever}%{?patchver:.%{patchver}}+%{buildver} %global openjdk_dir %{openjdk_repo}-jdk-%{featurever}.%{interimver}.%{updatever}%{?patchver:.%{patchver}}-%{buildver} diff --git a/jdk-17.0.10+7.tar.gz b/jdk-17.0.10+7.tar.gz new file mode 100644 index 0000000..337487c --- /dev/null +++ b/jdk-17.0.10+7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a310a8666d2d7770a7b29fe4750c275b9b33a07bfcc925348040a8bca745c874 +size 106411118 diff --git a/jdk-17.0.9+9.tar.gz b/jdk-17.0.9+9.tar.gz deleted file mode 100644 index d0ef257..0000000 --- a/jdk-17.0.9+9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:836adb5fec5a58ce2f49a0faeaf9e69a3cb89865f4d855c6098f0264843672ad -size 106413417