Skip to content

Commit

Permalink
Merge pull request #671 from ibmruntimes/openj9
Browse files Browse the repository at this point in the history
Merge latest OpenJ9 fixes into 0.40
  • Loading branch information
JasonFengJ9 committed Jun 16, 2023
2 parents b7f1e4b + 0ff7cf2 commit 85acfa3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
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

0 comments on commit 85acfa3

Please sign in to comment.