diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/x509v3.py | 1 | ||||
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/decode_asn1.py | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/_cffi_src/openssl/x509v3.py b/src/_cffi_src/openssl/x509v3.py index 30cb99cb..945bb3a9 100644 --- a/src/_cffi_src/openssl/x509v3.py +++ b/src/_cffi_src/openssl/x509v3.py @@ -257,6 +257,7 @@ int sk_POLICYINFO_push(Cryptography_STACK_OF_POLICYINFO *, POLICYINFO *); Cryptography_STACK_OF_POLICYINFO *sk_POLICYINFO_new_null(void); void sk_POLICYINFO_pop_free(Cryptography_STACK_OF_POLICYINFO *, sk_POLICYINFO_freefunc); +void CERTIFICATEPOLICIES_free(Cryptography_STACK_OF_POLICYINFO *); POLICYINFO *POLICYINFO_new(void); void POLICYINFO_free(POLICYINFO *); diff --git a/src/cryptography/hazmat/backends/openssl/decode_asn1.py b/src/cryptography/hazmat/backends/openssl/decode_asn1.py index 9ff38c97..b6910d9c 100644 --- a/src/cryptography/hazmat/backends/openssl/decode_asn1.py +++ b/src/cryptography/hazmat/backends/openssl/decode_asn1.py @@ -248,13 +248,7 @@ class _X509ExtensionParser(object): def _decode_certificate_policies(backend, cp): cp = backend._ffi.cast("Cryptography_STACK_OF_POLICYINFO *", cp) - - cp_freefunc = backend._ffi.addressof( - backend._lib._original_lib, "POLICYINFO_free" - ) - cp = backend._ffi.gc( - cp, lambda c: backend._lib.sk_POLICYINFO_pop_free(c, cp_freefunc) - ) + cp = backend._ffi.gc(cp, backend._lib.CERTIFICATEPOLICIES_free) num = backend._lib.sk_POLICYINFO_num(cp) certificate_policies = [] |