Skip to content

Commit

Permalink
Merge pull request ibmruntimes#844 from jasonkatonica/katonica/issue5…
Browse files Browse the repository at this point in the history
…24/rsmfailingduetobcsignedjarsnext

Ensure static fields set during signed jar process
  • Loading branch information
keithc-ca authored Sep 18, 2024
2 parents 4f827d7 + a2313ed commit 4aa4ebf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/java.base/share/classes/sun/security/jca/Providers.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ public class Providers {
// Note volatile immutable object, so no synchronization needed.
private static volatile ProviderList providerList;

static {
// set providerList to empty list first in case initialization somehow
// triggers a getInstance() call (although that should not happen)
providerList = ProviderList.EMPTY;
providerList = ProviderList.fromSecurityProperties();
RestrictedSecurity.checkHashValues();
}

private Providers() {
// empty
}
Expand Down Expand Up @@ -114,6 +106,14 @@ private Providers() {
"com.sun.crypto.provider.SunJCE",
};

static {
// set providerList to empty list first in case initialization somehow
// triggers a getInstance() call (although that should not happen)
providerList = ProviderList.EMPTY;
providerList = ProviderList.fromSecurityProperties();
RestrictedSecurity.checkHashValues();
}

// Return Sun provider.
// This method should only be called by
// sun.security.util.ManifestEntryVerifier and java.security.SecureRandom.
Expand Down

0 comments on commit 4aa4ebf

Please sign in to comment.