Skip to content

Commit

Permalink
fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 11, 2024
1 parent ded223b commit f979746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dploot/triage/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit f979746

Please sign in to comment.