Mercurial > hg
changeset 29111:843df550b465
sslutil: check for ui.insecureconnections in sslkwargs
The end result of this function is the same. We now have a more
explicit return branch.
We still keep the old code looking at web.cacerts=! a few lines
below because we're still setting web.cacerts=! and need to react
to the variable. This will be removed in an upcoming patch.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 05 May 2016 00:35:45 -0700 |
parents | b197e2aba703 |
children | 5edc5acecc83 |
files | mercurial/sslutil.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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