diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-09-24 12:00:40 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-09-24 12:00:40 -0500 |
commit | d5701ed9445c47097a28cb6523abaa4c11f41090 (patch) | |
tree | 4f85048d0eb6de0773b9dd5a492529842e1d30d3 | |
parent | 506f65b47f52377b0144669cfb41835762b25bb4 (diff) | |
download | cryptography-d5701ed9445c47097a28cb6523abaa4c11f41090.tar.gz cryptography-d5701ed9445c47097a28cb6523abaa4c11f41090.tar.bz2 cryptography-d5701ed9445c47097a28cb6523abaa4c11f41090.zip |
start and end BN_CTX so BN_CTX can track func owner of temporary BNs
-rw-r--r-- | cryptography/hazmat/backends/openssl/backend.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index 7e619a10..7da0ae25 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -1033,6 +1033,8 @@ class Backend(object): assert bn_ctx != self._ffi.NULL bn_ctx = self._ffi.gc(bn_ctx, self._lib.BN_CTX_free) + self._lib.BN_CTX_start(bn_ctx) + group = self._lib.EC_KEY_get0_group(ctx) assert group != self._ffi.NULL @@ -1069,6 +1071,8 @@ class Backend(object): self._lib.BN_cmp(bn_y, check_y) == 0 ) + self._lib.BN_CTX_end(bn_ctx) + res = self._lib.EC_KEY_set_public_key(ctx, point) assert res == 1 |