sslutil: rename 'minimumprotocolui' -> 'minimumprotocol'
authorManuel Jacob <me@manueljacob.de>
Mon, 01 Jun 2020 14:07:06 +0200
changeset 44899 4ca1110991c4
parent 44898 d61c05450b37
child 44900 38e3df9ff1e7
sslutil: rename 'minimumprotocolui' -> 'minimumprotocol' Before, both 'minimumprotocolui' and 'minimumprotocol' were used, but meaning the same.
mercurial/sslutil.py
--- a/mercurial/sslutil.py	Mon Jun 01 03:51:54 2020 +0200
+++ b/mercurial/sslutil.py	Mon Jun 01 14:07:06 2020 +0200
@@ -81,7 +81,7 @@
         b'protocol': None,
         # String representation of minimum protocol to be used for UI
         # presentation.
-        b'minimumprotocolui': None,
+        b'minimumprotocol': None,
         # ssl.CERT_* constant used by SSLContext.verify_mode.
         b'verifymode': None,
         # Defines extra ssl.OP* bitwise options to set.
@@ -123,7 +123,7 @@
     if ui.insecureconnections:
         minimumprotocol = b'tls1.0'
 
-    s[b'minimumprotocolui'] = minimumprotocol
+    s[b'minimumprotocol'] = minimumprotocol
     s[b'protocol'], s[b'ctxoptions'] = protocolsettings(minimumprotocol)
 
     ciphers = ui.config(b'hostsecurity', b'ciphers')
@@ -402,7 +402,7 @@
             # reason, try to emit an actionable warning.
             if e.reason == 'UNSUPPORTED_PROTOCOL':
                 # We attempted TLS 1.0+.
-                if settings[b'minimumprotocolui'] == b'tls1.0':
+                if settings[b'minimumprotocol'] == b'tls1.0':
                     # We support more than just TLS 1.0+. If this happens,
                     # the likely scenario is either the client or the server
                     # is really old. (e.g. server doesn't support TLS 1.0+ or
@@ -447,7 +447,7 @@
                             b'to be more secure than the server can support)\n'
                         )
                         % (
-                            settings[b'minimumprotocolui'],
+                            settings[b'minimumprotocol'],
                             pycompat.bytesurl(serverhostname),
                         )
                     )