@@ -534,7 +534,7 @@ private RubyArray matchedCiphersWithCache(final ThreadContext context) {
534534 private RubyArray matchedCiphers (final ThreadContext context ) {
535535 final Ruby runtime = context .runtime ;
536536 try {
537- final String [] supported = getSupportedCipherSuites (runtime , protocol );
537+ final String [] supported = getSupportedCipherSuites (context , protocol );
538538 final Collection <CipherStrings .Def > cipherDefs =
539539 CipherStrings .matchingCiphers (this .ciphers , supported , false );
540540
@@ -751,14 +751,14 @@ private void setApplicationProtocols(final SSLEngine engine) {
751751 }
752752 }
753753
754- private static String [] getSupportedCipherSuites (Ruby runtime , final String protocol )
754+ private static String [] getSupportedCipherSuites (ThreadContext context , final String protocol )
755755 throws GeneralSecurityException {
756- return dummySSLEngine (runtime , protocol ).getSupportedCipherSuites ();
756+ return dummySSLEngine (context , protocol ).getSupportedCipherSuites ();
757757 }
758758
759- private static SSLEngine dummySSLEngine (Ruby runtime , final String protocol ) throws GeneralSecurityException {
759+ private static SSLEngine dummySSLEngine (ThreadContext context , final String protocol ) throws GeneralSecurityException {
760760 javax .net .ssl .SSLContext sslContext = SecurityHelper .getSSLContext (protocol );
761- sslContext .init (null , null , OpenSSL .getSecureRandom (runtime ));
761+ sslContext .init (null , null , OpenSSL .getSecureRandom (context ));
762762 return sslContext .createSSLEngine ();
763763 }
764764
@@ -1017,7 +1017,7 @@ void initSSLContext(final ThreadContext context) throws KeyManagementException {
10171017 // SSLContext (internals) on Sun JDK :
10181018 // private final java.security.Provider provider; "SunJSSE"
10191019 // private final javax.net.ssl.SSLContextSpi; sun.security.ssl.SSLContextImpl
1020- sslContext .init (keyManager , trustManager , OpenSSL .getSecureRandomFrom (context ));
1020+ sslContext .init (keyManager , trustManager , OpenSSL .getSecureRandom (context ));
10211021 // if secureRandom == null JSSE will try :
10221022 // - new SecureRandom();
10231023 // - SecureRandom.getInstance("PKCS11", cryptoProvider);
0 commit comments