Mercurial > hg
diff mercurial/sslutil.py @ 46113:59fa3890d40a
node: import symbols explicitly
There is no point in lazy importing mercurial.node, it is used all over
the place anyway. So consistently import the used symbols directly.
Fix one file using symbols indirectly via mercurial.revlog.
Differential Revision: https://phab.mercurial-scm.org/D9480
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 01 Dec 2020 21:54:46 +0100 |
parents | 89a2afe31e82 |
children | 521ac0d7047f |
line wrap: on
line diff
--- a/mercurial/sslutil.py Sun Dec 13 18:29:22 2020 -0800 +++ b/mercurial/sslutil.py Tue Dec 01 21:54:46 2020 +0100 @@ -16,10 +16,10 @@ from .i18n import _ from .pycompat import getattr +from .node import hex from . import ( encoding, error, - node, pycompat, util, ) @@ -762,9 +762,9 @@ # If a certificate fingerprint is pinned, use it and only it to # validate the remote cert. peerfingerprints = { - b'sha1': node.hex(hashutil.sha1(peercert).digest()), - b'sha256': node.hex(hashlib.sha256(peercert).digest()), - b'sha512': node.hex(hashlib.sha512(peercert).digest()), + b'sha1': hex(hashutil.sha1(peercert).digest()), + b'sha256': hex(hashlib.sha256(peercert).digest()), + b'sha512': hex(hashlib.sha512(peercert).digest()), } def fmtfingerprint(s):