diff options
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/x509.py | 2 | ||||
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/asn1.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py index 1de3f4d5..17dd098f 100644 --- a/src/cryptography/hazmat/backends/openssl/x509.py +++ b/src/cryptography/hazmat/backends/openssl/x509.py @@ -99,5 +99,5 @@ class _X509Certificate(object): bio = self._backend._create_mem_bio() res = self._backend._lib.ASN1_TIME_print(bio, asn1_time) assert res == 1 - time = self._backend._read_mem_bio(bio) + time = self._backend._read_mem_bio(bio).decode("ascii") return datetime.datetime.strptime(time, "%b %d %H:%M:%S %Y GMT") diff --git a/src/cryptography/hazmat/bindings/openssl/asn1.py b/src/cryptography/hazmat/bindings/openssl/asn1.py index 7fe01fbc..5b1a56f2 100644 --- a/src/cryptography/hazmat/bindings/openssl/asn1.py +++ b/src/cryptography/hazmat/bindings/openssl/asn1.py @@ -120,7 +120,7 @@ const ASN1_ITEM *ASN1_ITEM_ptr(ASN1_ITEM_EXP *); /* These aren't macros these arguments are all const X on openssl > 1.0.x */ -int ASN1_TIME_print(BIO *, const ASN1_TIME *); +int ASN1_TIME_print(BIO *, ASN1_TIME *); int ASN1_STRING_length(ASN1_STRING *); ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *); int ASN1_STRING_cmp(ASN1_STRING *, ASN1_STRING *); |