diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2011-09-14 10:54:25 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2011-09-14 10:54:25 -0400 |
commit | bfac21719aeab888d99eb0d77317aff1f7a81613 (patch) | |
tree | ecdd72921c5e6e74a0d3aed3a0f890f71833d5af /OpenSSL | |
parent | 1eeccd892c4a01d4b1d496e2faee8c8118d26da7 (diff) | |
download | pyopenssl-bfac21719aeab888d99eb0d77317aff1f7a81613.tar.gz |
Avoid being CPython specific - the leakcheck script will catch these issues.
Diffstat (limited to 'OpenSSL')
-rw-r--r-- | OpenSSL/test/test_crypto.py | 31 |
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 |