summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Giannuzzi <jonathan@giannuzzi.be>2014-03-24 00:47:06 +0100
committerJonathan Giannuzzi <jonathan@giannuzzi.be>2014-03-30 21:58:08 +0200
commit3b97ec1370de513491ce77667ac0022643ae8147 (patch)
treeedcc3f1ec04e5541895e1b108623f622303f4cce
parent2ee8280a6433503cbb3a50ee602aa1cc706a0ee5 (diff)
downloadpyopenssl-3b97ec1370de513491ce77667ac0022643ae8147.tar.gz
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.
-rw-r--r--leakcheck/crypto.py10
1 files 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()