Get rid of some to_native and to_text calls. (#880)

This commit is contained in:
Felix Fontein
2025-05-02 15:58:39 +02:00
committed by GitHub
parent 0b8f3306c7
commit 86db561193
46 changed files with 100 additions and 140 deletions

View File

@@ -208,13 +208,13 @@ class CertificateInfoRetrieval:
ski = self._get_subject_key_identifier()
if ski is not None:
ski = to_native(binascii.hexlify(ski))
ski = binascii.hexlify(ski).decode("ascii")
ski = ":".join([ski[i : i + 2] for i in range(0, len(ski), 2)])
result["subject_key_identifier"] = ski
aki, aci, acsn = self._get_authority_key_identifier()
if aki is not None:
aki = to_native(binascii.hexlify(aki))
aki = binascii.hexlify(aki).decode("ascii")
aki = ":".join([aki[i : i + 2] for i in range(0, len(aki), 2)])
result["authority_key_identifier"] = aki
result["authority_cert_issuer"] = aci