Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
2 participants
@vbalazs
Copy link

vbalazs commented Mar 30, 2014

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

kares added a commit to kares/jruby that referenced this issue Apr 16, 2014

kares added a commit to kares/jruby that referenced this issue Apr 16, 2014

@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
You can’t perform that action at this time.