Skip to content

Commit

Permalink
Fixed #3492 -- use a better API (#3497)
Browse files Browse the repository at this point in the history
* Fixed #3492 -- use a better API

* More correct types

* Revert "More correct types"

This reverts commit e741292.
  • Loading branch information
alex authored and reaperhulk committed Apr 9, 2017
1 parent ef027a6 commit a699167
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/_cffi_src/openssl/x509v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
int sk_DIST_POINT_push(Cryptography_STACK_OF_DIST_POINT *, DIST_POINT *);
void sk_DIST_POINT_pop_free(Cryptography_STACK_OF_DIST_POINT *,
sk_DIST_POINT_freefunc);
void CRL_DIST_POINTS_free(Cryptography_STACK_OF_DIST_POINT *);
void sk_POLICYINFO_free(Cryptography_STACK_OF_POLICYINFO *);
int sk_POLICYINFO_num(Cryptography_STACK_OF_POLICYINFO *);
Expand Down
8 changes: 1 addition & 7 deletions src/cryptography/hazmat/backends/openssl/decode_asn1.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,7 @@ def _decode_extended_key_usage(backend, sk):

def _decode_crl_distribution_points(backend, cdps):
cdps = backend._ffi.cast("Cryptography_STACK_OF_DIST_POINT *", cdps)

dp_freefunc = backend._ffi.addressof(
backend._lib._original_lib, "DIST_POINT_free"
)
cdps = backend._ffi.gc(
cdps, lambda c: backend._lib.sk_DIST_POINT_pop_free(c, dp_freefunc)
)
cdps = backend._ffi.gc(cdps, backend._lib.CRL_DIST_POINTS_free)

num = backend._lib.sk_DIST_POINT_num(cdps)
dist_points = []
Expand Down

0 comments on commit a699167

Please sign in to comment.