Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sslutil.py @ 32313:2e455cbeac50
sslutil: tweak the legacy [hostfingerprints] warning message
Lars Rohwedder noted in issue5559 that the previous wording was
confusing. I agree.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 10 May 2017 23:49:37 -0700 |
parents | e05cfb4a6a8e |
children | bd872f64a8ba |
comparison
equal
deleted
inserted
replaced
32312:78496ac30025 | 32313:2e455cbeac50 |
---|---|
805 ui.debug('%s certificate matched fingerprint %s:%s\n' % | 805 ui.debug('%s certificate matched fingerprint %s:%s\n' % |
806 (host, hash, fmtfingerprint(fingerprint))) | 806 (host, hash, fmtfingerprint(fingerprint))) |
807 if settings['legacyfingerprint']: | 807 if settings['legacyfingerprint']: |
808 ui.warn(_('(SHA-1 fingerprint for %s found in legacy ' | 808 ui.warn(_('(SHA-1 fingerprint for %s found in legacy ' |
809 '[hostfingerprints] section; ' | 809 '[hostfingerprints] section; ' |
810 'if you trust this fingerprint, set the ' | 810 'if you trust this fingerprint, remove the old ' |
811 'following config value in [hostsecurity] and ' | 811 'SHA-1 fingerprint from [hostfingerprints] and ' |
812 'remove the old one from [hostfingerprints] ' | 812 'add the following entry to the new ' |
813 'to upgrade to a more secure SHA-256 ' | 813 '[hostsecurity] section: %s:fingerprints=%s)\n') % |
814 'fingerprint: ' | 814 (host, host, nicefingerprint)) |
815 '%s:fingerprints=%s)\n') % ( | |
816 host, host, nicefingerprint)) | |
817 return | 815 return |
818 | 816 |
819 # Pinned fingerprint didn't match. This is a fatal error. | 817 # Pinned fingerprint didn't match. This is a fatal error. |
820 if settings['legacyfingerprint']: | 818 if settings['legacyfingerprint']: |
821 section = 'hostfingerprint' | 819 section = 'hostfingerprint' |