Blame SOURCES/python-httplib2.getCertHost.patch

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