Skip to content

Cannot set ssl version with a symbol on jruby-1.7.0.RC2 #350

@ferrous26

Description

@ferrous26

CRuby accepts (wants) symbols for the SSL version in an SSLContext. JRuby tries to coerce the symbol to a string but fails:

require 'openssl'
ctx = OpenSSL::SSL::SSLContext.new
ctx.ssl_version = :'TLSv1_server'
TypeError: can't convert Symbol into String
    from org/jruby/ext/openssl/SSLContext.java:343:in `ssl_version='
    from (irb):3:in `evaluate'
    from org/jruby/RubyKernel.java:1065:in `eval'
    from org/jruby/RubyKernel.java:1390:in `loop'
    from org/jruby/RubyKernel.java:1173:in `catch'
    from org/jruby/RubyKernel.java:1173:in `catch'
    from /Users/mrada/.rvm/rubies/jruby-head/bin/irb:13:in `(root)'

Changing the symbol to a string fixes the exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions