summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2011-09-14 10:54:25 -0400
committerJean-Paul Calderone <exarkun@divmod.com>2011-09-14 10:54:25 -0400
commitbfac21719aeab888d99eb0d77317aff1f7a81613 (patch)
treeecdd72921c5e6e74a0d3aed3a0f890f71833d5af
parent1eeccd892c4a01d4b1d496e2faee8c8118d26da7 (diff)
downloadpyopenssl-bfac21719aeab888d99eb0d77317aff1f7a81613.tar.gz
Avoid being CPython specific - the leakcheck script will catch these issues.
-rw-r--r--OpenSSL/test/test_crypto.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
index 17a26b0..cc0ede2 100644
--- a/OpenSSL/test/test_crypto.py
+++ b/OpenSSL/test/test_crypto.py
@@ -2101,21 +2101,6 @@ class FunctionTests(TestCase):
self.assertRaises(ValueError, dump_privatekey, 100, key)
- def test_load_privatekey_passphraseCallbackLeak(self):
- """
- :py:obj:`crypto.load_privatekey` should not leak a reference to the
- passphrase when the passphrase is provided by a callback.
- """
- def cb(ignored):
- return encryptedPrivateKeyPEMPassphrase
-
- startCount = sys.getrefcount(encryptedPrivateKeyPEMPassphrase)
- for i in range(100):
- load_privatekey(FILETYPE_PEM, encryptedPrivateKeyPEM, cb)
- endCount = sys.getrefcount(encryptedPrivateKeyPEMPassphrase)
- self.assert_(endCount - startCount < 5, endCount - startCount)
-
-
def test_load_privatekey_passphraseCallbackLength(self):
"""
:py:obj:`crypto.load_privatekey` should raise an error when the passphrase
@@ -2244,22 +2229,6 @@ class FunctionTests(TestCase):
dump_privatekey, FILETYPE_PEM, key, "blowfish", cb)
- def test_dump_privatekey_passphraseCallbackLeak(self):
- """
- :py:obj:`crypto.dump_privatekey` should not leak a reference to the
- passphrase when the passphrase is provided by a callback.
- """
- def cb(ignored):
- return encryptedPrivateKeyPEMPassphrase
-
- startCount = sys.getrefcount(encryptedPrivateKeyPEMPassphrase)
- key = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
- for i in range(100):
- dump_privatekey(FILETYPE_PEM, key, "blowfish", cb)
- endCount = sys.getrefcount(encryptedPrivateKeyPEMPassphrase)
- self.assert_(endCount - startCount < 5, endCount - startCount)
-
-
def test_dump_privatekey_passphraseCallbackLength(self):
"""
:py:obj:`crypto.dump_privatekey` should raise an error when the passphrase