Blame SOURCES/python-httplib2.rfc2459.patch

2d8bb4
diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
2d8bb4
--- ./python2/httplib2/__init__.py.orig	2012-07-27 18:35:59.215300471 +1000
2d8bb4
+++ ./python2/httplib2/__init__.py	2012-07-27 18:36:30.697287505 +1000
2d8bb4
@@ -943,8 +943,13 @@ class HTTPSConnectionWithTimeout(httplib
2d8bb4
         """
2d8bb4
         if 'subjectAltName' in cert:
2d8bb4
             # Patch from richardfearn@gmail.com
2d8bb4
-	    return [x[1] for x in cert['subjectAltName']
2d8bb4
+            # RFC 2459 states that subjectAltName may contain:
2d8bb4
+            # either DNS, email, IP or URI
2d8bb4
+            # email, URI,
2d8bb4
+            hosts=[x[1] for x in cert['subjectAltName']
2d8bb4
                 if x[0].lower() == "dns"]
2d8bb4
+	    if hosts:
2d8bb4
+		return hosts
2d8bb4
2d8bb4
         return [x[0][1] for x in cert['subject']
2d8bb4
             if x[0][0].lower() == 'commonname']
2d8bb4