From 1528b30917f56b6e3dd6b93465a3339c6bdc1456 Mon Sep 17 00:00:00 2001 From: Wassilios Lytras Date: Wed, 5 Jan 2022 12:25:38 +0100 Subject: [PATCH] fix 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()