facebook/tornado — pull request #911 by gsmethells (2013-10-09 15:43:26+00:00)
Title: Allow user to define the SSL protocol used when using Python < 2.7

The hardcoding of ssl.PROTOCOL_SSLv3 in HTTPConnection._create_stream() is undesirable in cases where the server only supports TLS due to Federal security restrictions, in particular FIPS 140-2. When a Secure Websocket ("wss://") connection is attempted on such a server, the connection fails due to the hardcoded value.

The changes I have made provide a means to programmatically set the ssl_protocol of an HTTPRequest to provide the developer with control in the choice of protocol used in the HTTPConnection.

This change is important due to the number of RHEL (and derivative) OSes that are used due to their stability in industry settings and where Red Hat has neglected to update from Python 2.6 yet.