mercurial/sslutil.py
branchstable
changeset 49388 4a1f0bc0713e
parent 49387 be3828081624
child 50397 698ffff7024b
--- a/mercurial/sslutil.py	Tue Jul 12 15:59:53 2022 +0200
+++ b/mercurial/sslutil.py	Wed Jul 13 18:27:40 2022 +0200
@@ -546,7 +546,7 @@
                 _(b'referenced certificate file (%s) does not exist') % f
             )
 
-    if util.safehasattr(ssl, 'PROTOCOL_TLS_SERVER'):
+    if util.safehasattr(ssl, 'TLSVersion'):
         # python 3.7+
         sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
         sslcontext.options |= getattr(ssl, 'OP_NO_COMPRESSION', 0)