The code below yields the following error: OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A
require 'net/https'
uri = URI.parse("https://<server>.com")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.ssl_version = 'SSLv3'
http.get(uri.request_uri)
Any idea why? I tried everything mentioned in all other questions, still no luck.
- Ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin13.3.0]
- OpenSSL 0.9.8y 5 Feb 2013
Update I
Tried the following:
- Ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.3.0]
- OpenSSL 1.0.1i 6 Aug 2014
Update II
- Forced ssl_version to :TLSv1_2
Still no luck.
Update III
Alright, here's the final code - thanks to Steffen (see answer below):
require 'net/https'
uri = URI.parse("https://<server>.com")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.ssl_version = :TLSv1
http.ciphers = ['RC4-SHA']
http.get(uri.request_uri)
I doubt that my question will be relevant to anyone else since it was related to a remote misconfigured server.