Uninitialized constant OpenSSL::SSL::SSLContext::METHODS in 1.7.x #1596

Closed
vbalazs opened this Issue Mar 30, 2014 · 0 comments

2 participants

@vbalazs

I noticed that openshift/rhc gem doesn't work with 1.7.11 mostly because this constant is missing from JRuby.

I looked it up in the source of MRI and I found it here: https://github.com/ruby/ruby/blob/v1_9_3_448/ext/openssl/ossl_ssl.c#L1932

Very simple example:

$ ruby -v
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [linux-amd64]

$ ruby -ropenssl -e 'puts OpenSSL::SSL::SSLContext::METHODS'
NameError: uninitialized constant OpenSSL::SSL::SSLContext::METHODS
  const_missing at org/jruby/RubyModule.java:2690
         (root) at -e:1

Expected result:

$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

$ ruby -ropenssl -e 'puts OpenSSL::SSL::SSLContext::METHODS'
TLSv1
TLSv1_server
TLSv1_client
SSLv3
SSLv3_server
SSLv3_client
SSLv23
SSLv23_server
SSLv23_client

Maybe it's the same as the return value of String[] getEnabledProtocols(SSLEngine engine) ?

https://github.com/jruby/jruby/blob/jruby-1_7/ext/openssl/src/main/java/org/jruby/ext/openssl/SSLContext.java#L82

@mkristian mkristian closed this in 27378ed Apr 29, 2014
@enebo enebo added this to the JRuby 1.7.13 milestone Jun 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment