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

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