diff options
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index c0b3afe0..ebcf8015 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -1359,7 +1359,7 @@ class Backend(object): ec_cdata, public.x, public.y) private_value = self._ffi.gc( - self._int_to_bn(numbers.private_value), self._lib.BN_free + self._int_to_bn(numbers.private_value), self._lib.BN_clear_free ) res = self._lib.EC_KEY_set_private_key(ec_cdata, private_value) self.openssl_assert(res == 1) @@ -1394,7 +1394,7 @@ class Backend(object): point = self._ffi.gc(point, self._lib.EC_POINT_free) value = self._int_to_bn(private_value) - value = self._ffi.gc(value, self._lib.BN_free) + value = self._ffi.gc(value, self._lib.BN_clear_free) with self._tmp_bn_ctx() as bn_ctx: res = self._lib.EC_POINT_mul(group, point, value, self._ffi.NULL, |