1

I need to connect to a server that only accepts TLS 1.1 and above.

I'm using the following code to test my SSL version:

>>> import requests
>>> print requests.get('https://www.howsmyssl.com/a/check').text

The relevant part of the response is {"tls_version": "TLS 1.0"}.

In digging into this, it seems that my version of the python ssl library doesn't support a higher version of TLS:

>>> import ssl
>>> ssl._PROTOCOL_NAMES
{0: 'PROTOCOL_SSLv2',
 1: 'PROTOCOL_SSLv3',
 2: 'PROTOCOL_SSLv23',
 3: 'PROTOCOL_TLSv1'}

What can I do to get access to TLSv1.1 in python? I'm currently running OS X 10.10.5, python 2.7.10, and OpenSSL 0.9.8zg 14 July 2015. I've read that installing openssl and python through homebrew might solve my issue, but I'm wary of installing homebrewed python. I've done that in the past and remember having a lot of problems with it.

Note that this question seems to be the same, but it is unanswered at the moment.

Community
  • 1
  • 1
bgschiller
  • 2,087
  • 1
  • 16
  • 30
  • ***`OpenSSL 0.9.8`*** - yep, OpenSSL 0.9.8 is downlevel, it only supports TLS 1.0, and it lacks nearly all the EC goodies. You need an updated OpenSSL, and an updated Python. Macports is usually a good choice. – jww Mar 11 '16 at 21:18
  • [Updating openssl in python 2.7](http://stackoverflow.com/q/18752409), [How to use macport to install software?](http://superuser.com/q/377727), [How to upgrade OpenSSL in OS X?](http://apple.stackexchange.com/q/126830), etc... – jww Mar 11 '16 at 21:23
  • @jww okay, I was scared of homebrewed python but so far things are going well. Thanks :) – bgschiller Mar 14 '16 at 15:47

0 Answers0