Skip to content

Calling SSLContext#min_version= or max_version= results in call to undefined method set_minmax_proto_version #172

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

Closed
jhecking opened this issue Jul 31, 2018 · 2 comments

Comments

@jhecking
Copy link

Calling SSLContext#min_version= or SSLContext#max_version= raises a NoMethodError for undefined method set_minmax_proto_version:

$ ruby --version
jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a Java HotSpot(TM) 64-Bit Server VM 10.0.1+10 on 10.0.1+10 +jit [darwin-x86_64]
$ bundle show openssl
/Users/jhecking/.rvm/gems/jruby-9.1.16.0@global/gems/jruby-openssl-0.10.1-java
$ bundle exec irb
jruby-9.1.16.0 :001 > require 'openssl'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/Users/jhecking/.rvm/gems/jruby-9.1.16.0@global/gems/jruby-openssl-0.10.1-java/lib/jopenssl.jar) to constructor java.security.cert.CertificateFactory(java.security.cert.CertificateFactorySpi,java.security.Provider,java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 => true
jruby-9.1.16.0 :002 > ctx = OpenSSL::SSL::SSLContext.new
 => #<OpenSSL::SSL::SSLContext:0x7841bd30>
jruby-9.1.16.0 :003 > ctx.min_version = OpenSSL::SSL::TLS1_2_VERSION
NoMethodError: undefined method `set_minmax_proto_version' for #<OpenSSL::SSL::SSLContext:0x7841bd30 @max_proto_version=nil>
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0@global/gems/jruby-openssl-0.10.1-java/lib/jopenssl23/openssl/ssl.rb:160:in `min_version='
	from (irb):3:in `<eval>'
	from org/jruby/RubyKernel.java:995:in `eval'
	from org/jruby/RubyKernel.java:1316:in `loop'
	from org/jruby/RubyKernel.java:1138:in `catch'
	from org/jruby/RubyKernel.java:1138:in `catch'
	from /Users/jhecking/.rvm/rubies/jruby-9.1.16.0/bin/irb:13:in `<main>'
	from org/jruby/RubyKernel.java:974:in `load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:1:in `(root)'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:28:in `run'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:424:in `exec'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:27:in `dispatch'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:18:in `block in start'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/exe/bundle:30:in `(root)'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:124:in `<main>'
	from org/jruby/RubyKernel.java:974:in `load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/exe/bundle:22:in `<eval>'
	from org/jruby/RubyKernel.java:995:in `eval'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/bin/jruby_executable_hooks:24:in `<main>'
jruby-9.1.16.0 :004 >
jruby-9.1.16.0 :005 >   ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
NoMethodError: undefined method `set_minmax_proto_version' for #<OpenSSL::SSL::SSLContext:0x7841bd30>
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0@global/gems/jruby-openssl-0.10.1-java/lib/jopenssl23/openssl/ssl.rb:172:in `max_version='
	from (irb):5:in `<eval>'
	from org/jruby/RubyKernel.java:995:in `eval'
	from org/jruby/RubyKernel.java:1316:in `loop'
	from org/jruby/RubyKernel.java:1138:in `catch'
	from org/jruby/RubyKernel.java:1138:in `catch'
	from /Users/jhecking/.rvm/rubies/jruby-9.1.16.0/bin/irb:13:in `<main>'
	from org/jruby/RubyKernel.java:974:in `load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:1:in `(root)'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:28:in `run'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:424:in `exec'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:27:in `dispatch'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/cli.rb:18:in `block in start'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/exe/bundle:30:in `(root)'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:124:in `<main>'
	from org/jruby/RubyKernel.java:974:in `load'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/gems/bundler-1.16.3/exe/bundle:22:in `<eval>'
	from org/jruby/RubyKernel.java:995:in `eval'
	from /Users/jhecking/.rvm/gems/jruby-9.1.16.0/bin/jruby_executable_hooks:24:in `<main>'
jhecking added a commit to aerospike/aerospike-client-ruby that referenced this issue Aug 1, 2018
jhecking added a commit to aerospike/aerospike-client-ruby that referenced this issue Aug 2, 2018
jhecking added a commit to aerospike/aerospike-client-ruby that referenced this issue Aug 6, 2018
* Update dependencies for JRuby
* Add JRuby back to CI test matrix
* Skip TLS specs on JRuby for now (ref. jruby/jruby-openssl#172)
@SamarRamireddy
Copy link

What's the resolution for this, as I'm getting the same error.

@kares kares added this to the 0.10.5 milestone Mar 17, 2020
@MariuszCwikla
Copy link
Contributor

Fixed in #215

@kares kares removed this from the 0.10.5 milestone Apr 10, 2021
@kares kares closed this as completed Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants