I have the following code:
http = Net::HTTP.new(parsed_url.host, 443)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
protocol = "https"
In a single day thousands of calls are made. The server receiving the request has disabled SSLv3
because of the Poodle Vulnerability. The actual http call is wrapped in a timeout block that waits for 8 seconds for a response from the server. This code executes the request successfully 99% of the time, however occasionally a timeout occurs. After working with the Amazon support team, it was determined that all the calls which timed-out, were made using SSLv3
, which caused a handshake error. All the successful calls used TLSv1.1
or TLSv1.2
.
Can anyone shed some light, on the what might cause ruby to occasionally use SSLv3 in its attempts ? For additional context, this ruby code is being used with Nginx / Phusion Passenger, and being run on an Amazon Ec2 instance.