Blame SOURCES/python-httplib2.getCertHost.patch

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