[PATCH 1 of 2] sslutil: tweak the legacy [hostfingerprints] warning message
Matt Harbison
mharbison72 at gmail.com
Thu May 11 21:43:12 EDT 2017
On Thu, 11 May 2017 03:02:42 -0400, Gregory Szorc
<gregory.szorc at gmail.com> wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1494485377 25200
> # Wed May 10 23:49:37 2017 -0700
> # Node ID fc01a88a85d64a3a440971c5e3b6c8f7db030170
> # Parent 1ada3d18e7fbc9069910f2c036992d2f2b28e058
> sslutil: tweak the legacy [hostfingerprints] warning message
>
> Lars Rohwedder noted in issue5559 that the previous wording was
> confusing. I agree.
>
> diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
> --- a/mercurial/sslutil.py
> +++ b/mercurial/sslutil.py
> @@ -820,13 +820,11 @@ def validatesocket(sock):
> if settings['legacyfingerprint']:
> ui.warn(_('(SHA-1 fingerprint for %s found in
> legacy '
> '[hostfingerprints] section; '
> - 'if you trust this fingerprint, set the '
> - 'following config value in [hostsecurity]
> and '
> - 'remove the old one from
> [hostfingerprints] '
> - 'to upgrade to a more secure SHA-256 '
> - 'fingerprint: '
> - '%s.fingerprints=%s)\n') % (
> - host, host, nicefingerprint))
> + 'if you trust this fingerprint, remove
> the old '
> + 'SHA-1 fingerprint from
> [hostfingerprints] and '
> + 'add the following entry to the new '
> + '[hostsecurity] section:
> %s.fingerprints=%s)\n') %
> + (host, host, nicefingerprint))
> return
> # Pinned fingerprint didn't match. This is a fatal error.
I'm guessing it's because stable hasn't been merged since 5559, but
s/%s.fingerprints/%s:fingerprints/ ?
More information about the Mercurial-devel
mailing list