Skip to content

OpenSSL::X509::Store behaves differently on MRI #68

@mkristian

Description

@mkristian

setting custom SSL_CERT_FILE

$ SSL_CERT_FILE=nothing ruby -v -r openssl -e 'OpenSSL::X509::Store.new.set_default_paths'
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]

versus

$ SSL_CERT_FILE=nothing bin/ruby -v -r openssl -e 'OpenSSL::X509::Store.new.set_default_paths'
jruby 9.0.2.0-SNAPSHOT (2.2.2) 2015-09-10 9ceb2fe Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [darwin-x86_64]
OpenSSL::X509::StoreError: setting default path failed: NotFound
  set_default_paths at org/jruby/ext/openssl/X509Store.java:185
              <top> at /Users/cmeier/projects/active/jruby/lib/ruby/stdlib/jopenssl/load.rb:25
            require at org/jruby/RubyKernel.java:939
             (root) at /Users/cmeier/projects/active/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
              <top> at /Users/cmeier/projects/active/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            require at org/jruby/RubyKernel.java:939
             (root) at /Users/cmeier/projects/active/jruby/lib/ruby/stdlib/openssl.rb:1

the OpenSSL::X509::DEFAULT_CERT_FILE from the above MRI-2.2.3 is /usr/local/etc/openssl/cert.pem and does NOT exists. using this via SSL_CERT_FILE just works with MRI but fails with jruby-openssl-0.9.11.

that is add on to: #49

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions