From f979746b2401c627631bb28c947312156a6f8ebd Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 11 Jul 2024 12:50:18 +0200 Subject: [PATCH] fix #20 --- dploot/triage/certificates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dploot/triage/certificates.py b/dploot/triage/certificates.py index 59904fa..410d000 100755 --- a/dploot/triage/certificates.py +++ b/dploot/triage/certificates.py @@ -210,6 +210,7 @@ def correlate_certificates_and_privatekeys(self, certs: Dict[str, x509.Certifica logging.debug("Found match between %s certificate and %s private key !" % (name, pkey[0])) key = load_der_private_key(pkey[1].export_key('DER'), password=None) pfx = self.create_pfx(key=key,cert=cert) + # TODO CAN BE NULL self.get_id_from_certificate(certificate=cert)[1] username = self.get_id_from_certificate(certificate=cert)[1].replace('@','_') clientauth = False for i in cert.extensions.get_extension_for_oid(oid=ExtensionOID.EXTENDED_KEY_USAGE).value: @@ -255,7 +256,7 @@ def get_id_from_certificate(self,certificate: x509.Certificate) -> Tuple[str, st except Exception: pass - return None, None + return "", "SAN not found" @property def users(self) -> List[str]: