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
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)
OpenSSL::SSL::SSLSocket#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]
["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
SSL_RSA_WITH_RC4_128_SHA
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
Word, wasn't sure where to file - will move this.
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 :)
cipher
OpenSSL::SSL::Session has the protocol negotiated.
(maint) JRuby SSLSocket#cipher returns a string unlike MRI
98b0927
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
No branches or pull requests
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)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
The text was updated successfully, but these errors were encountered: