4

I am trying to force Ruby's net/http and net/https to use TLSv1 instead of SSLv3.

I have read a lot of articles which say that you can do this with one of:

http.ssl_version = :TLSv1

http.ssl_version = "TLSv1"

but neither seems to work, I keep on getting this error:

SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure

I am using ruby ruby 1.9.3p551, rails 2.3.18. Any help would be really appreciated, Thanks!

John Hascall
  • 9,176
  • 6
  • 48
  • 72
opensource-developer
  • 2,826
  • 4
  • 38
  • 88
  • 2
    Are you sure your server supports TLSv1, and not just SSLv3 and SSLv2? – ice13berg Dec 20 '14 at 07:47
  • 2
    Related: [How to set TLS context options in Ruby (like OpenSSL::SSL::SSL_OP_SSLv2)](http://stackoverflow.com/q/22550213/608639). The hacks provided will probably help you along. And you probably want TLS 1.0 and above (or TLS 1.1 and above), and not just TLS 1.0. The cited question should help you with that too. – jww Dec 21 '14 at 20:48

0 Answers0