aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2014-11-20 13:28:03 +0000
committerDaniele Tricoli <eriol@mornie.org>2014-11-20 13:28:03 +0000
commit8ef89a8dcccd9bbb7d189934385649ba27cd20be (patch)
treea759b37b94217325876b7e9d4afebf08babf6ca0 /debian/patches
parent874ffc18a181a397bf262463f7287f28eec633ba (diff)
downloadpython-urllib3-8ef89a8dcccd9bbb7d189934385649ba27cd20be.tar
python-urllib3-8ef89a8dcccd9bbb7d189934385649ba27cd20be.tar.gz
* debian/patches/06_do-not-make-SSLv3-mandatory.patch
- Since SSL version 3 is insicure it is supported only if Python supports it. (Closes: 770246)
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/06_do-not-make-SSLv3-mandatory.patch25
-rw-r--r--debian/patches/series1
2 files changed, 26 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,
diff --git a/debian/patches/series b/debian/patches/series
index b77d657..30602ad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
03_force_setuptools.patch
04_relax_nosetests_options.patch
05_avoid-embedded-ssl-match-hostname.patch
+06_do-not-make-SSLv3-mandatory.patch