Blame SOURCES/python-httplib2.getCertHost.patch

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