]>
Commit | Line | Data |
---|---|---|
5007a437 AM |
1 | diff -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. |