Skip to content

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

Closed
@vbalazs

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions