Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest OpenJ9 fixes into 0.40 #671

Merged
merged 8 commits into from
Jun 16, 2023
2 changes: 1 addition & 1 deletion closed/openjdk-tag.gmk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
OPENJDK_TAG := jdk-11.0.20+5
OPENJDK_TAG := jdk-11.0.20+6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion test/jdk/java/security/Signature/TestCloneable.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved
* ===========================================================================
*/

/*
* @test
* @bug 8246077
Expand All @@ -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" },
Expand Down
1 change: 1 addition & 0 deletions test/jdk/tools/jmod/hashes/HashesOrderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*
* @test
* @bug 8240903
* @key intermittent
* @summary Test consistency of moduleHashes attribute between builds
* @library /test/lib
* @run testng HashesOrderTest
Expand Down
Loading