diff options
author | Jonathan Giannuzzi <jonathan@giannuzzi.be> | 2014-03-24 01:32:58 +0100 |
---|---|---|
committer | Jonathan Giannuzzi <jonathan@giannuzzi.be> | 2014-03-30 21:58:08 +0200 |
commit | 8e6a64ee4c4373235f52e78bfa56692cf22bbec7 (patch) | |
tree | 56040e39ec4062ddac004529d39a0426e4e0fdf7 /leakcheck | |
parent | 3b97ec1370de513491ce77667ac0022643ae8147 (diff) | |
download | pyopenssl-git-8e6a64ee4c4373235f52e78bfa56692cf22bbec7.tar.gz |
Add a leakcheck test for CRL.add_revoked
Diffstat (limited to 'leakcheck')
-rw-r--r-- | leakcheck/crypto.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/leakcheck/crypto.py b/leakcheck/crypto.py index 5db5956..c52b975 100644 --- a/leakcheck/crypto.py +++ b/leakcheck/crypto.py @@ -102,10 +102,18 @@ FCB5K3c2kkTv2KjcCAimjxkE+SBKfHg35W0wB0AWkXpVFO5W/TbHg4tqtkpt/KMn -class Checker_CRL_get_revoked(BaseChecker): +class Checker_CRL(BaseChecker): """ - Leak checks for L{CRL.get_revoked}. + Leak checks for L{CRL.add_revoked} and L{CRL.get_revoked}. """ + def check_add_revoked(self): + """ + Call the add_revoked method repeatedly on an empty CRL. + """ + for i in xrange(self.iterations * 200): + CRL().add_revoked(Revoked()) + + def check_get_revoked(self): """ Create a CRL object with 100 Revoked objects, then call the |