1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 07:02:26 -05:00

Fixes AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3' issues.

This commit is contained in:
echel0n 2014-11-29 09:50:46 -08:00
parent 6f5474b999
commit 7c6b1b32de

View File

@ -59,9 +59,14 @@ HAS_SNI = SUBJ_ALT_NAME_SUPPORT
# Map from urllib3 to PyOpenSSL compatible parameter-values.
_openssl_versions = {
ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
}
try:
_openssl_versions.update({ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD})
except AttributeError:
pass
_openssl_verify = {
ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,