Remove unneeded calls
A serial number and a revocation date do not need to be set for the
leak to occur in the current version of pyOpenSSL.
diff --git a/leakcheck/crypto.py b/leakcheck/crypto.py
index b07d1f0..5db5956 100644
--- a/leakcheck/crypto.py
+++ b/leakcheck/crypto.py
@@ -2,7 +2,6 @@
# See LICENSE for details.
import sys
-from datetime import datetime
from OpenSSL.crypto import (
FILETYPE_PEM, TYPE_DSA, Error, PKey, X509, load_privatekey, CRL, Revoked)
@@ -109,15 +108,12 @@
"""
def check_get_revoked(self):
"""
- Create a CRL object with 1000 Revoked objects, then call the
+ Create a CRL object with 100 Revoked objects, then call the
get_revoked method repeatedly.
"""
crl = CRL()
- for serial in xrange(1000):
- revoked = Revoked()
- revoked.set_serial(str(serial))
- revoked.set_rev_date(datetime.utcnow().strftime('%Y%m%d%H%M%SZ'))
- crl.add_revoked(revoked)
+ for i in xrange(100):
+ crl.add_revoked(Revoked())
for i in xrange(self.iterations):
crl.get_revoked()