From 3b97ec1370de513491ce77667ac0022643ae8147 Mon Sep 17 00:00:00 2001 From: Jonathan Giannuzzi Date: Mon, 24 Mar 2014 00:47:06 +0100 Subject: 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. --- leakcheck/crypto.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 @@ class Checker_CRL_get_revoked(BaseChecker): """ 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() -- cgit v1.2.1