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).
--- 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