Commits

Brandon Rhodes committed 450c925

Bugfix from Python trunk for Issue 12000.

  • Participants
  • Parent commits 67f1340

Comments (0)

Files changed (1)

 
 import re
 
-__version__ = '3.2a3'
+__version__ = '3.2.2+'
 
 class CertificateError(ValueError):
     pass
             if _dnsname_to_pat(value).match(hostname):
                 return
             dnsnames.append(value)
-    if not san:
-        # The subject is only checked when subjectAltName is empty
+    if not dnsnames:
+        # The subject is only checked when there is no dNSName entry
+        # in subjectAltName
         for sub in cert.get('subject', ()):
             for key, value in sub:
                 # XXX according to RFC 2818, the most specific Common Name