fix wrong change from d7cde85862
commit
This commit is contained in:
parent
f6c5928827
commit
7a1633ac9b
4
index.py
4
index.py
@ -62,7 +62,7 @@ def tlsa_validation(DOMAIN):
|
|||||||
return(False)
|
return(False)
|
||||||
|
|
||||||
if selector == "0":
|
if selector == "0":
|
||||||
certdata = cert.as_der()
|
certdata = dercert
|
||||||
elif selector == "1":
|
elif selector == "1":
|
||||||
cert = x509.load_pem_x509_certificate(cert, default_backend())
|
cert = x509.load_pem_x509_certificate(cert, default_backend())
|
||||||
certdata = cert.public_key().public_bytes(Encoding.DER, PublicFormat.SubjectPublicKeyInfo)
|
certdata = cert.public_key().public_bytes(Encoding.DER, PublicFormat.SubjectPublicKeyInfo)
|
||||||
@ -70,7 +70,7 @@ def tlsa_validation(DOMAIN):
|
|||||||
raise ValueError("selector type %d not recognized" % selector)
|
raise ValueError("selector type %d not recognized" % selector)
|
||||||
|
|
||||||
if mtype == "0":
|
if mtype == "0":
|
||||||
certdata = dercert
|
hexdata2 = hexdump(certdata)
|
||||||
elif mtype == "1":
|
elif mtype == "1":
|
||||||
hexdata2 = compute_hash(hashlib.sha256, certdata)
|
hexdata2 = compute_hash(hashlib.sha256, certdata)
|
||||||
elif mtype == "2":
|
elif mtype == "2":
|
||||||
|
Loading…
Reference in New Issue
Block a user