diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -483,6 +483,10 @@ coreconfigitem('hostsecurity', '.*:ciphe default=dynamicdefault, generic=True, ) +coreconfigitem('hostsecurity', '.*:fingerprints$', + default=list, + generic=True, +) coreconfigitem('http_proxy', 'always', default=False, ) diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py --- a/mercurial/sslutil.py +++ b/mercurial/sslutil.py @@ -186,8 +186,7 @@ def _hostsettings(ui, hostname): # Look for fingerprints in [hostsecurity] section. Value is a list # of : strings. - fingerprints = ui.configlist('hostsecurity', '%s:fingerprints' % hostname, - []) + fingerprints = ui.configlist('hostsecurity', '%s:fingerprints' % hostname) for fingerprint in fingerprints: if not (fingerprint.startswith(('sha1:', 'sha256:', 'sha512:'))): raise error.Abort(_('invalid fingerprint for %s: %s') % (