##// END OF EJS Templates
sslutil: migrate to hashutil.sha1 instead of hashlib.sha1...
Augie Fackler -
r44518:cbc5755d default
parent child Browse files
Show More
@@ -24,6 +24,7 b' from . import ('
24 util,
24 util,
25 )
25 )
26 from .utils import (
26 from .utils import (
27 hashutil,
27 resourceutil,
28 resourceutil,
28 stringutil,
29 stringutil,
29 )
30 )
@@ -949,7 +950,7 b' def validatesocket(sock):'
949 # If a certificate fingerprint is pinned, use it and only it to
950 # If a certificate fingerprint is pinned, use it and only it to
950 # validate the remote cert.
951 # validate the remote cert.
951 peerfingerprints = {
952 peerfingerprints = {
952 b'sha1': node.hex(hashlib.sha1(peercert).digest()),
953 b'sha1': node.hex(hashutil.sha1(peercert).digest()),
953 b'sha256': node.hex(hashlib.sha256(peercert).digest()),
954 b'sha256': node.hex(hashlib.sha256(peercert).digest()),
954 b'sha512': node.hex(hashlib.sha512(peercert).digest()),
955 b'sha512': node.hex(hashlib.sha512(peercert).digest()),
955 }
956 }
General Comments 0
You need to be logged in to leave comments. Login now