Skip to content
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

OpenSSL::SSL::SSLSocket#cipher different than MRI #2436

Closed
jordansissel opened this issue Jan 6, 2015 · 3 comments
Closed

OpenSSL::SSL::SSLSocket#cipher different than MRI #2436

jordansissel opened this issue Jan 6, 2015 · 3 comments

Comments

@jordansissel
Copy link
Contributor

MRI's docs say OpenSSL::SSL::SSLSocket#cipher (http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/SSL/SSLSocket.html#method-i-cipher)

cipher => [name, version, bits, alg_bits]

Under MRI 2.1.4, this returns something like the docs say:
["ECDHE-RSA-AES128-GCM-SHA256", "TLSv1/SSLv3", 128, 128]

Under JRuby 1.7.17, this returns a single string (not array w/ 4 elements): SSL_RSA_WITH_RC4_128_SHA

@headius
Copy link
Member

headius commented Jan 6, 2015

Interesting. I'm curious...are you using those other bits for something?

I think you should re-file this at jruby/jruby-openssl. We're trying to maintain it as a separate project.

@headius headius closed this as completed Jan 6, 2015
@jordansissel
Copy link
Contributor Author

Word, wasn't sure where to file - will move this.

@jordansissel
Copy link
Contributor Author

For context, I was hoping to ask the socket what TLS version it had negotiated, assuming cipher included it, but it doesn't! Nothing to do here :)

OpenSSL::SSL::Session has the protocol negotiated.

@enebo enebo added this to the Invalid or Duplicate milestone Jan 30, 2015
joshcooper added a commit to joshcooper/puppet that referenced this issue Apr 3, 2020
MRI's SSLSocket#cipher returns an array, while JRuby returns a string[1]. We
don't typically run our client http code under JRuby, but ensure we don't crash
when trying to print debug info.

[1] jruby/jruby#2436
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

3 participants