Blame SOURCES/python-httplib2-0.9-cve-2013-2037.patch

6a3e49
diff -Nur httplib2-0.9.orig/python2/httplib2/__init__.py httplib2-0.9/python2/httplib2/__init__.py
6a3e49
--- httplib2-0.9.orig/python2/httplib2/__init__.py	2015-04-03 13:10:43.401035131 -0600
6a3e49
+++ httplib2-0.9/python2/httplib2/__init__.py	2015-04-03 13:10:08.470685647 -0600
6a3e49
@@ -1042,7 +1042,7 @@
6a3e49
                         raise CertificateHostnameMismatch(
6a3e49
                             'Server presented certificate that does not match '
6a3e49
                             'host %s: %s' % (hostname, cert), hostname, cert)
6a3e49
-            except ssl_SSLError, e:
6a3e49
+            except (ssl_SSLError, CertificateHostnameMismatch), e:
6a3e49
                 if sock:
6a3e49
                     sock.close()
6a3e49
                 if self.sock:
6a3e49
@@ -1052,7 +1052,7 @@
6a3e49
                 # to get at more detailed error information, in particular
6a3e49
                 # whether the error is due to certificate validation or
6a3e49
                 # something else (such as SSL protocol mismatch).
6a3e49
-                if e.errno == ssl.SSL_ERROR_SSL:
6a3e49
+                if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL:
6a3e49
                     raise SSLHandshakeError(e)
6a3e49
                 else:
6a3e49
                     raise