diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py --- a/mercurial/sslutil.py +++ b/mercurial/sslutil.py @@ -24,6 +24,7 @@ util, ) from .utils import ( + hashutil, resourceutil, stringutil, ) @@ -949,7 +950,7 @@ # If a certificate fingerprint is pinned, use it and only it to # validate the remote cert. peerfingerprints = { - b'sha1': node.hex(hashlib.sha1(peercert).digest()), + b'sha1': node.hex(hashutil.sha1(peercert).digest()), b'sha256': node.hex(hashlib.sha256(peercert).digest()), b'sha512': node.hex(hashlib.sha512(peercert).digest()), }