From bfa6628a9fb49680a7588f211692a81f168eda8b255fbd3ad43302180ec6fc07 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 2 May 2013 10:24:13 +0000 Subject: [PATCH] - Add httplib2-bnc-818100.patch (bnc#818100): Fix for subsequent request SSL certificate validation - Add httplib2-bnc-818100.patch (bnc#818100): Fix for subsequent request SSL certificate validation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httplib2?expand=0&rev=34 --- httplib2-bnc-818100.patch | 21 +++++++++++++++++++++ python-httplib2.changes | 6 ++++++ python-httplib2.spec | 3 +++ python3-httplib2.changes | 6 ++++++ python3-httplib2.spec | 3 +++ 5 files changed, 39 insertions(+) create mode 100644 httplib2-bnc-818100.patch diff --git a/httplib2-bnc-818100.patch b/httplib2-bnc-818100.patch new file mode 100644 index 0000000..4466103 --- /dev/null +++ b/httplib2-bnc-818100.patch @@ -0,0 +1,21 @@ +diff -r 93291649202b python2/httplib2/__init__.py +--- a/python2/httplib2/__init__.py Tue Mar 26 14:17:48 2013 -0400 ++++ b/python2/httplib2/__init__.py Tue Apr 23 10:32:15 2013 +0300 +@@ -1030,7 +1030,7 @@ + raise CertificateHostnameMismatch( + 'Server presented certificate that does not match ' + 'host %s: %s' % (hostname, cert), hostname, cert) +- except ssl_SSLError, e: ++ except (ssl_SSLError, CertificateHostnameMismatch), e: + if sock: + sock.close() + if self.sock: +@@ -1040,7 +1040,7 @@ + # to get at more detailed error information, in particular + # whether the error is due to certificate validation or + # something else (such as SSL protocol mismatch). +- if e.errno == ssl.SSL_ERROR_SSL: ++ if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL: + raise SSLHandshakeError(e) + else: + raise diff --git a/python-httplib2.changes b/python-httplib2.changes index 9a59123..98354f4 100644 --- a/python-httplib2.changes +++ b/python-httplib2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 2 10:23:29 UTC 2013 - speilicke@suse.com + +- Add httplib2-bnc-818100.patch (bnc#818100): Fix for subsequent + request SSL certificate validation + ------------------------------------------------------------------- Fri Mar 22 13:30:17 UTC 2013 - speilicke@suse.com diff --git a/python-httplib2.spec b/python-httplib2.spec index 7c1e544..026d2e9 100644 --- a/python-httplib2.spec +++ b/python-httplib2.spec @@ -26,6 +26,8 @@ Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz # PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162) Patch0: httplib2-use-system-certs.patch +# PATCH-FIX-UPSTREAM: speilicke@suse.com -- SSL certificate hostname mismatch is checked only once +Patch1: httplib2-bnc-818100.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel # Test requirements (for ssl module): @@ -48,6 +50,7 @@ left out of other HTTP libraries. %prep %setup -q -n httplib2-%{version} %patch0 -p1 +%patch1 -p1 %build python setup.py build diff --git a/python3-httplib2.changes b/python3-httplib2.changes index 069d8ea..89b312c 100644 --- a/python3-httplib2.changes +++ b/python3-httplib2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 2 10:23:36 UTC 2013 - speilicke@suse.com + +- Add httplib2-bnc-818100.patch (bnc#818100): Fix for subsequent + request SSL certificate validation + ------------------------------------------------------------------- Fri Jan 11 19:51:38 UTC 2013 - p.drouand@gmail.com diff --git a/python3-httplib2.spec b/python3-httplib2.spec index bb88988..606b8a4 100644 --- a/python3-httplib2.spec +++ b/python3-httplib2.spec @@ -26,6 +26,8 @@ Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz # PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162) Patch0: httplib2-use-system-certs.patch +# PATCH-FIX-UPSTREAM: speilicke@suse.com -- SSL certificate hostname mismatch is checked only once +Patch1: httplib2-bnc-818100.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python3-devel # Test requirements (for ssl module): @@ -44,6 +46,7 @@ left out of other HTTP libraries. %prep %setup -q -n httplib2-%{version} %patch0 -p1 +%patch1 -p1 %build python3 setup.py build