mercurial/sslutil.py
changeset 14666 27b080aa880a
parent 14616 64dfbe576455
child 14667 8f12dac18d13
equal deleted inserted replaced
14665:d89f80898178 14666:27b080aa880a
    46     if san:
    46     if san:
    47         certnames = [value.lower() for key, value in san if key == 'DNS']
    47         certnames = [value.lower() for key, value in san if key == 'DNS']
    48         for name in certnames:
    48         for name in certnames:
    49             if matchdnsname(name):
    49             if matchdnsname(name):
    50                 return None
    50                 return None
    51         return _('certificate is for %s') % ', '.join(certnames)
    51         if certnames:
       
    52             return _('certificate is for %s') % ', '.join(certnames)
    52 
    53 
    53     # subject is only checked when subjectAltName is empty
    54     # subject is only checked when subjectAltName is empty
    54     for s in cert.get('subject', []):
    55     for s in cert.get('subject', []):
    55         key, value = s[0]
    56         key, value = s[0]
    56         if key == 'commonName':
    57         if key == 'commonName':