Blame SOURCES/python-httplib2.getCertHost.patch

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