aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/06_do-not-make-SSLv3-mandatory.patch
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2014-11-20 13:17:59 +0100
committerDaniele Tricoli <eriol@mornie.org>2014-11-20 13:17:59 +0100
commitec1beaaecc9dcb6777961181be97461cf68e7a5e (patch)
tree80641d2e50db11a265abba5e110b7228491165e4 /debian/patches/06_do-not-make-SSLv3-mandatory.patch
parent5601ae1921ae1f7c9edba741db299916be202cff (diff)
parent79946b58eade5182cdeb529bda459b705c35b36e (diff)
downloadpython-urllib3-ec1beaaecc9dcb6777961181be97461cf68e7a5e.tar
python-urllib3-ec1beaaecc9dcb6777961181be97461cf68e7a5e.tar.gz
Imported Debian patch 1.9.1-3
Diffstat (limited to 'debian/patches/06_do-not-make-SSLv3-mandatory.patch')
-rw-r--r--debian/patches/06_do-not-make-SSLv3-mandatory.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/06_do-not-make-SSLv3-mandatory.patch b/debian/patches/06_do-not-make-SSLv3-mandatory.patch
new file mode 100644
index 0000000..0ce3f4a
--- /dev/null
+++ b/debian/patches/06_do-not-make-SSLv3-mandatory.patch
@@ -0,0 +1,25 @@
+Description: Since SSL version 3 is insicure it is supported only if Python
+ supports it. In Debian SSL version 3 is disabled in system Python since
+ 2.7.8-12.
+Author: Daniele Tricoli <eriol@mornie.org>
+Forwarded: https://github.com/shazow/urllib3/issues/487#issuecomment-63805742
+Last/Update: 2014-11-20
+
+--- a/urllib3/contrib/pyopenssl.py
++++ b/urllib3/contrib/pyopenssl.py
+@@ -70,9 +70,14 @@
+ # 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,