diff mercurial/dispatch.py @ 24290:b76d8c641746

ssl: set explicit symbol "!" to web.cacerts to disable SSL verification (BC) The next patch will enable verification by using the system's CA store if possible, which means we would have to distinguish None (=use default) from '' (=--insecure). This smells bug-prone and provides no way to override web.cacerts to forcibly use the system's store by --config argument. This patch changes the meaning of web.cacerts as follows: value behavior ------- --------------------------------------- None/'' use default '!' never use CA certs (set by --insecure) <path> verify by the specified CA certificates Values other than <path> are for internal use and therefore undocumented.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 04 Mar 2015 23:27:04 +0900
parents 02d7b5cd373b
children 670c1df688fd
line wrap: on
line diff
--- a/mercurial/dispatch.py	Wed Mar 04 22:41:48 2015 +0900
+++ b/mercurial/dispatch.py	Wed Mar 04 23:27:04 2015 +0900
@@ -826,7 +826,7 @@
 
     if cmdoptions.get('insecure', False):
         for ui_ in uis:
-            ui_.setconfig('web', 'cacerts', '', '--insecure')
+            ui_.setconfig('web', 'cacerts', '!', '--insecure')
 
     if options['version']:
         return commands.version_(ui)