File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/main/java/org/jruby/ext/openssl Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -854,8 +854,7 @@ private class InternalContext {
854854
855855 // initialize SSL context :
856856
857- final javax .net .ssl .SSLContext sslContext ;
858- sslContext = SecurityHelper .getSSLContext (protocol );
857+ final javax .net .ssl .SSLContext sslContext = SecurityHelper .getSSLContext (protocol );
859858
860859 if ( protocolForClient ) {
861860 final SSLSessionContext clientContext = sslContext .getClientSessionContext ();
@@ -871,11 +870,17 @@ private class InternalContext {
871870 serverContext .setSessionCacheSize (sessionCacheSize );
872871 }
873872 }
873+ this .sslContext = initContext (sslContext );
874+ }
874875
876+ protected javax .net .ssl .SSLContext initContext (javax .net .ssl .SSLContext sslContext ) throws KeyManagementException {
875877 final KeyManager [] keyManager = new KeyManager [] { new KeyManagerImpl (this ) };
876878 final TrustManager [] trustManager = new TrustManager [] { new TrustManagerImpl (this ) };
879+ // SSLContext on Sun JDK :
880+ // private final java.security.Provider provider; "SunJSSE"
881+ // private final javax.net.ssl.SSLContextSpi; sun.security.ssl.SSLContextImpl
877882 sslContext .init (keyManager , trustManager , null );
878- this . sslContext = sslContext ;
883+ return sslContext ;
879884 }
880885
881886 final Store store ;
You can’t perform that action at this time.
0 commit comments