aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-02-04 22:24:07 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-02-04 09:24:07 -0500
commit1fdf29e6e0575e7976c68a6245fa217f6d611752 (patch)
treef98638feea5d935365f9136c1c3ccd6937af68ea /tests/hazmat/backends
parentfc2ad04b46129806b8261caff8e7260675a2d33d (diff)
downloadcryptography-1fdf29e6e0575e7976c68a6245fa217f6d611752.tar.gz
cryptography-1fdf29e6e0575e7976c68a6245fa217f6d611752.tar.bz2
cryptography-1fdf29e6e0575e7976c68a6245fa217f6d611752.zip
fix a memory leak in ec derive_private_key (#4096)
* fix a memory leak in ec derive_private_key fixes #4095 * pep8!
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl_memleak.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_openssl_memleak.py b/tests/hazmat/backends/test_openssl_memleak.py
index 6e92e341..74973fe5 100644
--- a/tests/hazmat/backends/test_openssl_memleak.py
+++ b/tests/hazmat/backends/test_openssl_memleak.py
@@ -214,3 +214,11 @@ class TestOpenSSLMemoryLeaks(object):
)
).private_key(backend)
"""))
+
+ def test_ec_derive_private_key(self):
+ assert_no_memory_leaks(textwrap.dedent("""
+ def func():
+ from cryptography.hazmat.backends.openssl import backend
+ from cryptography.hazmat.primitives.asymmetric import ec
+ ec.derive_private_key(1, ec.SECP256R1(), backend)
+ """))