mercurial/sslutil.py
changeset 29111 843df550b465
parent 29108 16021d58c5ca
child 29112 5edc5acecc83
--- a/mercurial/sslutil.py	Thu May 05 00:34:22 2016 -0700
+++ b/mercurial/sslutil.py	Thu May 05 00:35:45 2016 -0700
@@ -243,8 +243,13 @@
     if hostfingerprint:
         return kws
 
-    # dispatch sets web.cacerts=! when --insecure is used.
+    # The code below sets up CA verification arguments. If --insecure is
+    # used, we don't take CAs into consideration, so return early.
+    if ui.insecureconnections:
+        return kws
+
     cacerts = ui.config('web', 'cacerts')
+    # TODO remove check when we stop setting this config.
     if cacerts == '!':
         return kws