Skip to content
Snippets Groups Projects
Commit 53b7fc7c authored by Gregory Szorc's avatar Gregory Szorc
Browse files

sslutil: don't attempt to find default CA certs file when told not to

Before, devel.disableloaddefaultcerts only impacted the loading of
default certs via SSLContext. After this patch, the config option also
prevents sslutil._defaultcacerts() from being called.

This config option is meant to be used by tests to force no CA certs
to be loaded. Future patches will enable _defaultcacerts() to have
success more often. Without this change we can't reliably test the
failure to load CA certs. (This patch also likely fixes test failures
on some OS X configurations.)
parent 918dce4b
No related branches found
No related tags found
No related merge requests found
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
if not os.path.exists(cafile): if not os.path.exists(cafile):
raise error.Abort(_('could not find web.cacerts: %s') % raise error.Abort(_('could not find web.cacerts: %s') %
cafile) cafile)
else: elif s['allowloaddefaultcerts']:
# CAs not defined in config. Try to find system bundles. # CAs not defined in config. Try to find system bundles.
cafile = _defaultcacerts(ui) cafile = _defaultcacerts(ui)
if cafile: if cafile:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment