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

Strange behavior for SSL handshake error #535

Closed
inossidabile opened this issue Feb 14, 2013 · 2 comments
Closed

Strange behavior for SSL handshake error #535

inossidabile opened this issue Feb 14, 2013 · 2 comments

Comments

@inossidabile
Copy link

In certain circumstances JRuby hangs until HTTP timeout (loading all the CPU) while MRI raises "SSL Handshake Failure".

Here is the test case that works for all modern branches (starting from 1.6) including master HEAD:

require 'net/http'

Net::HTTP.start('gate.rapida.ru', 443,
  :use_ssl => true,
  :verify_mode => OpenSSL::SSL::VERIFY_NONE
) do |http|

  http.get("/test/getfee") do |response|
    p response
  end
end
@inossidabile
Copy link
Author

It appears that the service provided in test case (gate.rapida.ru) answers with incorrect handshake. This however doesn't stop MRI from working with real keys. It stops JRuby though. Keys were not assigned to the test-case intentionally – their presence doesn't affect JRuby behavior. It still hangs.

@headius
Copy link
Member

headius commented Apr 5, 2016

JRuby now does not hang, but the server given also does not appear to produce a bad handshake (since it works fine in MRI too).

[] ~/projects/jruby $ jruby -ropenssl blah.rb
""
"<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://10.59.1.1:81/index.php?url=https%3A%2F%2Fgate.rapida.ru%2Ftest%2Fgetfee&SID=5bbf15ed0040dfee137e7ab27cf4c78d\">\n"

[] ~/projects/jruby $ ruby23 -ropenssl blah.rb
""
"<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://10.59.1.1:81/index.php?url=https%3A%2F%2Fgate.rapida.ru%2Ftest%2Fgetfee&SID=863b9b00c85acca8911fb70b56fc6a9d\">\n"

I don't know when this was fixed, so I'll close it as invalid.

@headius headius closed this as completed Apr 5, 2016
@headius headius added this to the Invalid or Duplicate milestone Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants