Skip to content

Commit

Permalink
Re-run the initialization of SSLContextImpl$DefaultManagersHolder at …
Browse files Browse the repository at this point in the history
…run time.
  • Loading branch information
cstancu committed Nov 13, 2019
1 parent 2f7ecb7 commit 1e3f5a6
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ public void duringSetup(DuringSetupAccess access) {
ImageSingletons.lookup(RuntimeClassInitializationSupport.class).rerunInitialization(clazz(access, "sun.security.krb5.Confounder"), "for substitutions");
ImageSingletons.lookup(RuntimeClassInitializationSupport.class).rerunInitialization(javax.net.ssl.SSLContext.class, "for substitutions");

/*
* When SSLContextImpl$DefaultManagersHolder sets-up the TrustManager in its initializer it
* gets the value of the -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStorePassword
* properties from the build machine. Re-runing its initialization at run time is required
* to use the run time provided values.
*/
ImageSingletons.lookup(RuntimeClassInitializationSupport.class).rerunInitialization(clazz(access, "sun.security.ssl.SSLContextImpl$DefaultManagersHolder"),
"for reading properties at run time");

if (SubstrateOptions.EnableAllSecurityServices.getValue()) {
/* Prepare SunEC native library access. */
prepareSunEC();
Expand Down

0 comments on commit 1e3f5a6

Please sign in to comment.