1 diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
2 --- ./python2/httplib2/__init__.py.orig 2012-07-27 18:35:59.215300471 +1000
3 +++ ./python2/httplib2/__init__.py 2012-07-27 18:36:30.697287505 +1000
4 @@ -943,8 +943,13 @@ class HTTPSConnectionWithTimeout(httplib
6 if 'subjectAltName' in cert:
7 # Patch from richardfearn@gmail.com
8 - return [x[1] for x in cert['subjectAltName']
9 + # RFC 2459 states that subjectAltName may contain:
10 + # either DNS, email, IP or URI
12 + hosts=[x[1] for x in cert['subjectAltName']
13 if x[0].lower() == "dns"]
17 return [x[0][1] for x in cert['subject']
18 if x[0][0].lower() == 'commonname']