nahi/httpclient — pull request #186 by jgraichen (2014-01-09 15:40:14+00:00)
Title: Change default SSL version to :auto to use TLS version negotiation.

By default httpclient sets SSLContext version to SSLv3 and therefore disables TLS version negotiation. That means every library using httpclient that does not unset SSL version always uses only SSLv3 and cannot connect to a server that only supports TLSv1.0+.

This also leads to the problem that if httpclient was not used directly but by a third-party library it will suffer the same problem without any way to change this outside patching the library's usage of httpclient.

Error when connecting to a TLS-only server using default settings:
```
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure
```

If no SSL version is given to SSLContext it will correctly negotiate the version with the server and (in my case) will use TLSv1.2. Additional allowing the client to negotiate the version with the server would allow the client to use the best possible available protocol version. SSLv2 would still be not allowed as it is disabled in the cipher suite list (`!SSLv2`).

This PR changes the default value to `:auto`. If SSL version is set to `:auto` it will not be passed to the SSLContext. I've also updates the corresponding documentation.