2d8bb4
diff -up ./python2/httplib2/__init__.py.getCertHost ./python2/httplib2/__init__.py
2d8bb4
--- ./python2/httplib2/__init__.py.getCertHost	2012-05-03 17:16:33.834155219 +1000
2d8bb4
+++ ./python2/httplib2/__init__.py	2012-06-21 18:19:33.804660257 +1000
2d8bb4
@@ -942,11 +942,12 @@ class HTTPSConnectionWithTimeout(httplib
2d8bb4
           list: A list of valid host globs.
2d8bb4
         """
2d8bb4
         if 'subjectAltName' in cert:
2d8bb4
-            return [x[1] for x in cert['subjectAltName']
2d8bb4
-                    if x[0].lower() == 'dns']
2d8bb4
-        else:
2d8bb4
-            return [x[0][1] for x in cert['subject']
2d8bb4
-                    if x[0][0].lower() == 'commonname']
2d8bb4
+            # Patch from richardfearn@gmail.com
2d8bb4
+	    return [x[1] for x in cert['subjectAltName']
2d8bb4
+                if x[0].lower() == "dns"]
2d8bb4
+
2d8bb4
+        return [x[0][1] for x in cert['subject']
2d8bb4
+            if x[0][0].lower() == 'commonname']
2d8bb4
 
2d8bb4
     def _ValidateCertificateHostname(self, cert, hostname):
2d8bb4
         """Validates that a given hostname is valid for an SSL certificate.