archiloque/rest-client — pull request #140 by BanzaiMan (2012-09-11 03:07:53+00:00)
Title: Provide functionality to specify the SSL version for the Net::HTTP connection

Under some circumstances, the REST Client can fail to connect with an error message such as:

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A

(I have observed this problem with MRI 1.9.3 p194 running on Mac OS X 10.8.1; the identical code worked flawlessly on a Fedora 17 machine.)

As explained in http://stackoverflow.com/questions/6821051/ruby-ssl-error-sslv3-alert-unexpected-message, a solution is to specify the SSL version for the Net::HTTP connection.

This patch provides a functionality to specify it via the option passed for a RestClient::Request object.