diff --git a/pyas2lib/utils.py b/pyas2lib/utils.py index ff204cc..5947c55 100644 --- a/pyas2lib/utils.py +++ b/pyas2lib/utils.py @@ -245,11 +245,11 @@ def extract_certificate_info(cert: bytes): certificate.get_notAfter().decode("utf8"), "%Y%m%d%H%M%SZ" ).replace(tzinfo=timezone.utc) cert_info["subject"] = [ - tuple(item.decode("utf8") for item in sets) + tuple(item.decode("utf8", "backslashreplace") for item in sets) for sets in certificate.get_subject().get_components() ] cert_info["issuer"] = [ - tuple(item.decode("utf8") for item in sets) + tuple(item.decode("utf8", "backslashreplace") for item in sets) for sets in certificate.get_issuer().get_components() ] cert_info["serial"] = certificate.get_serial_number()