Skip to content

always_verify_ssl_certificates causes class cast error #7875

@headius

Description

@headius

When the "always_verify_ssl_certificate" gem is installed, bundle installs appear to fail with a ClassCastException in jruby-openssl:

Java::JavaLang::ClassCastException: class org.jruby.RubyNil cannot be cast to class org.jruby.ext.openssl.SSLContext (org.jruby.RubyNil is in module org.jruby.dist of loader 'app'; org.jruby.ext.openssl.SSLContext is in unnamed module of loader org.jruby.util.JRubyClassLoader @3eb7fc54)
  org.jruby.ext.openssl.SSLSocket.initialize(SSLSocket.java:167)
  org.jruby.ext.openssl.SSLSocket$INVOKER$i$0$0$initialize.call(SSLSocket$INVOKER$i$0$0$initialize.gen)
  org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:829)
  org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:306)
  org.jruby.dist/org.jruby.RubyClass.newInstance(RubyClass.java:917)
  org.jruby.dist/org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)
  org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrTwoOrNBlock.call(JavaMethod.java:377)
  org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:291)
  Users.headius.work.jruby.lib.ruby.gems.shared.gems.always_verify_ssl_certificates_minus_0_dot_3_dot_0.lib.always_verify_ssl_certificates.invokeOther18:new(/Users/headius/work/jruby/lib/ruby/gems/shared/gems/always_verify_ssl_certificates-0.3.0/lib/always_verify_ssl_certificates.rb:17)
  Users.headius.work.jruby.lib.ruby.gems.shared.gems.always_verify_ssl_certificates_minus_0_dot_3_dot_0.lib.always_verify_ssl_certificates.RUBY$method$connect$2(/Users/headius/work/jruby/lib/ruby/gems/shared/gems/always_verify_ssl_certificates-0.3.0/lib/always_verify_ssl_certificates.rb:17)
  org.jruby.dist/org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:215)
  org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)
  org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.fcall(CachingCallSite.java:199)
  Users.headius.work.jruby.lib.ruby.stdlib.net.http.invokeOther206:connect(/Users/headius/work/jruby/lib/ruby/stdlib/net/http.rb:995)
  Users.headius.work.jruby.lib.ruby.stdlib.net.http.RUBY$method$do_start$43(/Users/headius/work/jruby/lib/ruby/stdlib/net/http.rb:995)

I have not investigated this. Removing the gem fixes it.

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