summaryrefslogtreecommitdiffstats
path: root/Lib/test/make_ssl_certs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/make_ssl_certs.py')
-rw-r--r--Lib/test/make_ssl_certs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/make_ssl_certs.py b/Lib/test/make_ssl_certs.py
index f630813..4251d55 100644
--- a/Lib/test/make_ssl_certs.py
+++ b/Lib/test/make_ssl_certs.py
@@ -28,8 +28,10 @@ req_template = """
[ CA_default ]
dir = cadir
database = $dir/index.txt
+ crlnumber = $dir/crl.txt
default_md = sha1
default_days = 3600
+ default_crl_days = 3600
certificate = pycacert.pem
private_key = pycakey.pem
serial = $dir/serial
@@ -112,6 +114,8 @@ def make_ca():
os.mkdir(TMP_CADIR)
with open(os.path.join('cadir','index.txt'),'a+') as f:
pass # empty file
+ with open(os.path.join('cadir','crl.txt'),'a+') as f:
+ r.write("00")
with open(os.path.join('cadir','index.txt.attr'),'w+') as f:
f.write('unique_subject = no')
@@ -129,6 +133,8 @@ def make_ca():
'-keyfile', 'pycakey.pem', '-days', '3650',
'-selfsign', '-extensions', 'v3_ca', '-infiles', f.name ]
check_call(['openssl'] + args)
+ args = ['ca', '-config', t.name, '-gencrl', '-out', 'revocation.crl']
+ check_call(['openssl'] + args)
if __name__ == '__main__':
os.chdir(here)