This is the code that I use to connect to the SSL site.
require 'mechanize'
a = Mechanize.new
page = a.get 'https://site.com'
I am using the Ruby 1.9.3 and Mechanize 2.1pre1 + dependencies. On Mac, the above code works and returns the page. On Windows 7 with the same versions, it causes the following error:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
Reverting to Mechanize 2.0.1 seems to solve this problem, but after that I succeed in the problem too many connections reset by peer. So this is not a solution.
I tried to do it a.verify_mode = false, but it does nothing. I read that you can turn off SSL verification using:
open(uri,:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)
How can I disable it in Mechanize? Why am I getting this error only on Windows?