mercurial/sslutil.py
changeset 44932 47b3c8383cc1
parent 44061 cbc5755df6bf
child 44934 7c19eb372438
equal deleted inserted replaced
44931:aa790f7c967a 44932:47b3c8383cc1
    56 try:
    56 try:
    57     # ssl.SSLContext was added in 2.7.9 and presence indicates modern
    57     # ssl.SSLContext was added in 2.7.9 and presence indicates modern
    58     # SSL/TLS features are available.
    58     # SSL/TLS features are available.
    59     SSLContext = ssl.SSLContext
    59     SSLContext = ssl.SSLContext
    60     modernssl = True
    60     modernssl = True
    61     _canloaddefaultcerts = util.safehasattr(SSLContext, b'load_default_certs')
    61     _canloaddefaultcerts = True
    62 except AttributeError:
    62 except AttributeError:
    63     modernssl = False
    63     modernssl = False
    64     _canloaddefaultcerts = False
    64     _canloaddefaultcerts = False
    65 
    65 
    66     # We implement SSLContext using the interface from the standard library.
    66     # We implement SSLContext using the interface from the standard library.