diff --git a/closed/openjdk-tag.gmk b/closed/openjdk-tag.gmk index 764aeb89372..d33fe7288ff 100644 --- a/closed/openjdk-tag.gmk +++ b/closed/openjdk-tag.gmk @@ -1 +1 @@ -OPENJDK_TAG := jdk-11.0.20+5 +OPENJDK_TAG := jdk-11.0.20+6 diff --git a/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java b/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java index d09e0adc4cb..473c60d3779 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java @@ -48,6 +48,8 @@ import jdk.internal.ref.CleanerFactory; +import openj9.internal.security.RestrictedSecurity; + /** * This class represents a PBE key derived using PBKDF2 defined * in PKCS#5 v2.0. meaning that @@ -118,7 +120,11 @@ private static byte[] getPasswordBytes(char[] passwd) { } else if (keyLength < 0) { throw new InvalidKeySpecException("Key length is negative"); } - this.prf = Mac.getInstance(prfAlgo); + if (RestrictedSecurity.isFIPSEnabled()) { + this.prf = Mac.getInstance(prfAlgo); + } else { + this.prf = Mac.getInstance(prfAlgo, SunJCE.getInstance()); + } this.key = deriveKey(prf, passwdBytes, salt, iterCount, keyLength); } catch (NoSuchAlgorithmException nsae) { // not gonna happen; re-throw just in case diff --git a/test/jdk/java/security/Signature/TestCloneable.java b/test/jdk/java/security/Signature/TestCloneable.java index 33e2383cfa4..4312acd2c15 100644 --- a/test/jdk/java/security/Signature/TestCloneable.java +++ b/test/jdk/java/security/Signature/TestCloneable.java @@ -21,6 +21,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved + * =========================================================================== + */ + /* * @test * @bug 8246077 @@ -45,7 +51,6 @@ public Object[][] testData() { return new Object[][] { { "SHA1withDSA", "SUN" }, { "NONEwithDSA", "SUN" }, { "SHA224withDSA", "SUN" }, { "SHA256withDSA", "SUN" }, - { "EdDSA", "SunEC" }, { "Ed25519", "SunEC" }, { "Ed448", "SunEC" }, { "SHA1withECDSA", "SunEC" }, { "SHA224withECDSA", "SunEC" }, { "SHA256withECDSA", "SunEC" }, { "SHA384withECDSA", "SunEC" }, { "SHA512withECDSA", "SunEC" }, { "NONEwithECDSA", "SunEC" }, diff --git a/test/jdk/tools/jmod/hashes/HashesOrderTest.java b/test/jdk/tools/jmod/hashes/HashesOrderTest.java index 58d1b10e9b8..5f5f5c3577e 100644 --- a/test/jdk/tools/jmod/hashes/HashesOrderTest.java +++ b/test/jdk/tools/jmod/hashes/HashesOrderTest.java @@ -24,6 +24,7 @@ /* * @test * @bug 8240903 + * @key intermittent * @summary Test consistency of moduleHashes attribute between builds * @library /test/lib * @run testng HashesOrderTest