Mercurial > hg-stable
changeset 44932:47b3c8383cc1
sslutil: set `_canloaddefaultcerts` to `True` if `ssl.SSLContext` is present
The `load_default_certs()` method was already present when `ssl.SSLContext`
was backported to Python 2.7 (https://hg.python.org/cpython/rev/221a1f9155e2).
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Sat, 30 May 2020 03:46:59 +0200 |
parents | aa790f7c967a |
children | 4c53c12b92d5 |
files | mercurial/sslutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sslutil.py Thu May 28 16:16:13 2020 -0400 +++ b/mercurial/sslutil.py Sat May 30 03:46:59 2020 +0200 @@ -58,7 +58,7 @@ # SSL/TLS features are available. SSLContext = ssl.SSLContext modernssl = True - _canloaddefaultcerts = util.safehasattr(SSLContext, b'load_default_certs') + _canloaddefaultcerts = True except AttributeError: modernssl = False _canloaddefaultcerts = False