summaryrefslogtreecommitdiffstats
path: root/python/httplib2/ssl_hostname.diff
diff options
context:
space:
mode:
author Larry Hajali2014-02-10 16:17:10 +0100
committer Erik Hanson2014-02-11 19:14:56 +0100
commit89e6f2c4c43bb932c44fcd97fd7db45b1dce13fc (patch)
tree9ddc53fd384d967ee355d7dc11a83e6ce7c25ebd /python/httplib2/ssl_hostname.diff
parent8f3e79a5b786d141bbdf37543bd1bfc5b747a91b (diff)
downloadslackbuilds-89e6f2c4c43bb932c44fcd97fd7db45b1dce13fc.tar.gz
python/httplib2: Added patches for ssl.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'python/httplib2/ssl_hostname.diff')
-rw-r--r--python/httplib2/ssl_hostname.diff21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/httplib2/ssl_hostname.diff b/python/httplib2/ssl_hostname.diff
new file mode 100644
index 0000000000..964a1ec774
--- /dev/null
+++ b/python/httplib2/ssl_hostname.diff
@@ -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