Last active
August 21, 2017 19:01
-
-
Save LordGaav/4674198 to your computer and use it in GitHub Desktop.
Ugly Python hack to make SSL work properly with broken SSL servers and Ubuntu 12.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
# Ugly hack to force SSLv3 and avoid | |
# urllib2.URLError: <urlopen error [Errno 1] _ssl.c:504: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error> | |
import _ssl | |
_ssl.PROTOCOL_SSLv23 = _ssl.PROTOCOL_TLSv1 | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment