aboutsummaryrefslogtreecommitdiff
path: root/scripts/testroot.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-11-14 04:17:16 +0000
committerRob Austein <sra@hactrn.net>2007-11-14 04:17:16 +0000
commit43948f0e75b25feb7b70e09369c0d20859395fcb (patch)
treec4c7e9b3710467c45187e0c0295766ec2044677c /scripts/testroot.py
parentbda2abb79dd3adce8edbb35acd6394befc6a8ced (diff)
Make valid_until mandatory in left-right protocol, and reflect
resulting validity interval in generated certs. svn path=/scripts/biz-certs/Bob-CA.srl; revision=1287
Diffstat (limited to 'scripts/testroot.py')
-rwxr-xr-xscripts/testroot.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/testroot.py b/scripts/testroot.py
index 762a1757..f92cd24a 100755
--- a/scripts/testroot.py
+++ b/scripts/testroot.py
@@ -13,11 +13,15 @@ Default configuration file is testroot.conf, override with --config option.
import traceback, os, time, getopt, sys, lxml
import rpki.resource_set, rpki.up_down, rpki.left_right, rpki.x509
import rpki.https, rpki.config, rpki.cms, rpki.exceptions, rpki.relaxng
+import rpki.sundial
root_name = "wombat"
root_base = "rsync://" + root_name + ".invalid/"
root_cert = root_base + "testroot.cer"
+rpki_subject_lifetime = rpki.sundial.timedelta(days = 30)
+
+
def get_subject_cert():
try:
x = rpki.x509.X509(Auto_file = rpki_subject_filename)
@@ -71,7 +75,8 @@ class issue_pdu(rpki.up_down.issue_pdu):
sia = req_sia,
aia = root_cert,
crldp = crldp,
- resources = resources))
+ resources = resources,
+ notAfter = rpki.sundial.datetime.utcnow() + rpki_subject_lifetime))
compose_response(r_msg)
class revoke_pdu(rpki.up_down.revoke_pdu):