]> git.pld-linux.org Git - packages/python-httplib2.git/blame - python-httplib2.getCertHost.patch
- release 2 (by relup.sh)
[packages/python-httplib2.git] / python-httplib2.getCertHost.patch
CommitLineData
5007a437
AM
1diff -up ./python2/httplib2/__init__.py.getCertHost ./python2/httplib2/__init__.py
2--- ./python2/httplib2/__init__.py.getCertHost 2012-05-03 17:16:33.834155219 +1000
3+++ ./python2/httplib2/__init__.py 2012-06-21 18:19:33.804660257 +1000
4@@ -942,11 +942,12 @@ class HTTPSConnectionWithTimeout(httplib
5 list: A list of valid host globs.
6 """
7 if 'subjectAltName' in cert:
8- return [x[1] for x in cert['subjectAltName']
9- if x[0].lower() == 'dns']
10- else:
11- return [x[0][1] for x in cert['subject']
12- if x[0][0].lower() == 'commonname']
13+ # Patch from richardfearn@gmail.com
14+ return [x[1] for x in cert['subjectAltName']
15+ if x[0].lower() == "dns"]
16+
17+ return [x[0][1] for x in cert['subject']
18+ if x[0][0].lower() == 'commonname']
19
20 def _ValidateCertificateHostname(self, cert, hostname):
21 """Validates that a given hostname is valid for an SSL certificate.
This page took 0.053298 seconds and 4 git commands to generate.