diff options
-rw-r--r-- | src/_cffi_src/openssl/asn1.py | 3 | ||||
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/encode_asn1.py | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/_cffi_src/openssl/asn1.py b/src/_cffi_src/openssl/asn1.py index 51acf10c..82bf7979 100644 --- a/src/_cffi_src/openssl/asn1.py +++ b/src/_cffi_src/openssl/asn1.py @@ -30,6 +30,7 @@ typedef struct asn1_string_st ASN1_UTF8STRING; typedef ... ASN1_TYPE; typedef ... ASN1_GENERALIZEDTIME; typedef ... ASN1_ENUMERATED; +typedef ... ASN1_NULL; static const int V_ASN1_GENERALIZEDTIME; @@ -97,6 +98,8 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *, ASN1_INTEGER *); int i2d_ASN1_TYPE(ASN1_TYPE *, unsigned char **); ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **, const unsigned char **, long); + +ASN1_NULL *ASN1_NULL_new(void); """ CUSTOMIZATIONS = """ diff --git a/src/cryptography/hazmat/backends/openssl/encode_asn1.py b/src/cryptography/hazmat/backends/openssl/encode_asn1.py index a2c7ed73..896ea055 100644 --- a/src/cryptography/hazmat/backends/openssl/encode_asn1.py +++ b/src/cryptography/hazmat/backends/openssl/encode_asn1.py @@ -245,11 +245,8 @@ def _txt2obj_gc(backend, name): def _encode_ocsp_nocheck(backend, ext): - """ - The OCSP No Check extension is defined as a null ASN.1 value embedded in - an ASN.1 string. - """ - return _encode_asn1_str_gc(backend, b"\x05\x00", 2) + # Doesn't need to be GC'd + return backend._lib.ASN1_NULL_new() def _encode_key_usage(backend, key_usage): |