Blame SOURCES/python-httplib2.getCertHost.patch

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