Mercurial > public > mercurial-scm > hg
comparison mercurial/sslutil.py @ 34748:8c1d0fe1f431
configitems: register the 'hostfingerprints' section
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 12 Oct 2017 00:20:41 +0200 |
parents | dacfcdd8b94e |
children | 17919e9006b9 |
comparison
equal
deleted
inserted
replaced
34747:5cf98daad7b1 | 34748:8c1d0fe1f431 |
---|---|
198 alg, fingerprint = fingerprint.split(':', 1) | 198 alg, fingerprint = fingerprint.split(':', 1) |
199 fingerprint = fingerprint.replace(':', '').lower() | 199 fingerprint = fingerprint.replace(':', '').lower() |
200 s['certfingerprints'].append((alg, fingerprint)) | 200 s['certfingerprints'].append((alg, fingerprint)) |
201 | 201 |
202 # Fingerprints from [hostfingerprints] are always SHA-1. | 202 # Fingerprints from [hostfingerprints] are always SHA-1. |
203 for fingerprint in ui.configlist('hostfingerprints', hostname, []): | 203 for fingerprint in ui.configlist('hostfingerprints', hostname): |
204 fingerprint = fingerprint.replace(':', '').lower() | 204 fingerprint = fingerprint.replace(':', '').lower() |
205 s['certfingerprints'].append(('sha1', fingerprint)) | 205 s['certfingerprints'].append(('sha1', fingerprint)) |
206 s['legacyfingerprint'] = True | 206 s['legacyfingerprint'] = True |
207 | 207 |
208 # If a host cert fingerprint is defined, it is the only thing that | 208 # If a host cert fingerprint is defined, it is the only thing that |