Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Python use old version of OpenSSL? #21118
Comments
|
You must build python agains this openssl version yourself or get it from somewhere. |
|
Sorry, don't understand you. Can you explain more? |
|
Tried a new Python version for macOS (from the official Python website)? |
|
Yes (tried both, latest 2 and 3), but same error |
|
It says TLSv1 error. |
|
what should I do? |
|
Same issue, any help is welcome. |
Checklist
Question
Hello. I used macOS Sierra 10.12.6. I DON'T USE HOMEBREW! I tried to download from Vimeo with youtube -dl and got this:
ERROR: Unable to download webpage: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)> (caused by URLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))It's because OpenSSL version supplied with macOS out of date. So I updated openssl like this:
$ curl -O https://www.openssl.org/source/openssl-1.1.1b.tar.gz
$ tar -zxvf openssl-1.1.1b.tar.gz
$ cd openssl-1.1.1b
$ ./config
$ make
$ sudo make install
After that, I check openssl version:
$ openssl version
OpenSSL 1.1.1b 26 Feb 2019
And check where is it:
$ which openssl
/usr/local/bin/openssl
But error exists anyway. Then I check what version python used:
$ python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 0.9.8zh 14 Jan 2016
It's old out of date version!
Question: how can I tell the python (and other apps that may use openssl) use the new version?