summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Giannuzzi <jonathan@giannuzzi.be>2014-03-24 01:32:58 +0100
committerJonathan Giannuzzi <jonathan@giannuzzi.be>2014-03-30 21:58:08 +0200
commit8e6a64ee4c4373235f52e78bfa56692cf22bbec7 (patch)
tree56040e39ec4062ddac004529d39a0426e4e0fdf7
parent3b97ec1370de513491ce77667ac0022643ae8147 (diff)
downloadpyopenssl-8e6a64ee4c4373235f52e78bfa56692cf22bbec7.tar.gz
Add a leakcheck test for CRL.add_revoked
-rw-r--r--leakcheck/crypto.py12
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