Skip to content

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

Closed
@jhecking

Description

@jhecking

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>'

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