fix wrong change from d7cde85862 commit

This commit is contained in:
Beu 2019-07-25 22:49:22 +02:00
parent f6c5928827
commit 7a1633ac9b

View File

@ -62,7 +62,7 @@ def tlsa_validation(DOMAIN):
return(False)
if selector == "0":
certdata = cert.as_der()
certdata = dercert
elif selector == "1":
cert = x509.load_pem_x509_certificate(cert, default_backend())
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)
if mtype == "0":
certdata = dercert
hexdata2 = hexdump(certdata)
elif mtype == "1":
hexdata2 = compute_hash(hashlib.sha256, certdata)
elif mtype == "2":