mercurial/sslutil.py
branchstable
changeset 29617 2960ceee1948
parent 29601 6cff2ac0ccb9
child 29618 fbf4adc0d8f2
--- a/mercurial/sslutil.py	Tue Jul 19 19:57:34 2016 -0700
+++ b/mercurial/sslutil.py	Tue Jul 19 20:16:51 2016 -0700
@@ -181,6 +181,12 @@
     protocol = ui.config('hostsecurity', key, protocol)
     validateprotocol(protocol, key)
 
+    # If --insecure is used, we allow the use of TLS 1.0 despite config options.
+    # We always print a "connection security to %s is disabled..." message when
+    # --insecure is used. So no need to print anything more here.
+    if ui.insecureconnections:
+        protocol = 'tls1.0'
+
     s['protocol'], s['ctxoptions'] = protocolsettings(protocol)
 
     ciphers = ui.config('hostsecurity', 'ciphers')