--- a/tests/hghave.py Fri Jul 01 18:03:51 2016 -0700
+++ b/tests/hghave.py Fri Jul 01 19:04:39 2016 -0700
@@ -415,20 +415,22 @@
@check("defaultcacerts", "can verify SSL certs by system's CA certs store")
def has_defaultcacerts():
- from mercurial import sslutil
- return sslutil._defaultcacerts() or sslutil._canloaddefaultcerts
+ from mercurial import sslutil, ui as uimod
+ ui = uimod.ui()
+ return sslutil._defaultcacerts(ui) or sslutil._canloaddefaultcerts
@check("defaultcacertsloaded", "detected presence of loaded system CA certs")
def has_defaultcacertsloaded():
import ssl
- from mercurial import sslutil
+ from mercurial import sslutil, ui as uimod
if not has_defaultcacerts():
return False
if not has_sslcontext():
return False
- cafile = sslutil._defaultcacerts()
+ ui = uimod.ui()
+ cafile = sslutil._defaultcacerts(ui)
ctx = ssl.create_default_context()
if cafile:
ctx.load_verify_locations(cafile=cafile)