comparison 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
comparison
equal deleted inserted replaced
24289:07fafcd4bc74 24290:b76d8c641746
824 for ui_ in uis: 824 for ui_ in uis:
825 ui_.setconfig('ui', 'interactive', 'off', '-y') 825 ui_.setconfig('ui', 'interactive', 'off', '-y')
826 826
827 if cmdoptions.get('insecure', False): 827 if cmdoptions.get('insecure', False):
828 for ui_ in uis: 828 for ui_ in uis:
829 ui_.setconfig('web', 'cacerts', '', '--insecure') 829 ui_.setconfig('web', 'cacerts', '!', '--insecure')
830 830
831 if options['version']: 831 if options['version']:
832 return commands.version_(ui) 832 return commands.version_(ui)
833 if options['help']: 833 if options['help']:
834 return commands.help_(ui, cmd, command=True) 834 return commands.help_(ui, cmd, command=True)