From 562b190671b1e96e12e47fc15e5824a8a422461e Mon Sep 17 00:00:00 2001 From: Wassilios Lytras Date: Mon, 10 Jan 2022 08:27:31 +0100 Subject: [PATCH] Fix issues https://github.com/abhishek-ram/pyas2-lib/issues/29 --- pyas2lib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()