aboutsummaryrefslogtreecommitdiff
path: root/rpkid/testpoke.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-04-07 23:02:39 +0000
committerRob Austein <sra@hactrn.net>2008-04-07 23:02:39 +0000
commit7cd197b5a208ba4dc9b2430f9e20e28f504e7892 (patch)
tree16fea9eed8b64ab1ac99e2e1a0393dba2d3722bd /rpkid/testpoke.py
parent14bd2769a9392101fd34b33ffa7d5d211511d97e (diff)
Hideously inefficient first cut at dynamic TLS trust anchor handling.
With this enabled, client certificate validation finally works. Efficiency issues deferred until new trust anchor model is in place, since it will need to be rewritten at that point anyway. svn path=/rpkid/rpki/gctx.py; revision=1628
Diffstat (limited to 'rpkid/testpoke.py')
-rw-r--r--rpkid/testpoke.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/rpkid/testpoke.py b/rpkid/testpoke.py
index 185c99ea..d964b72c 100644
--- a/rpkid/testpoke.py
+++ b/rpkid/testpoke.py
@@ -21,6 +21,7 @@ Configuration file is YAML to be compatable with APNIC rpki_poke.pl tool.
Usage: python testpoke.py [ { -y | --yaml } configfile ]
[ { -r | --request } requestname ]
+ [ { -d | --debug } ]
[ { -h | --help } ]
Default configuration file is testpoke.yaml, override with --yaml option.
@@ -29,7 +30,7 @@ Default configuration file is testpoke.yaml, override with --yaml option.
import os, time, getopt, sys, lxml, yaml
import rpki.resource_set, rpki.up_down, rpki.left_right, rpki.x509
import rpki.https, rpki.config, rpki.cms, rpki.exceptions
-import rpki.relaxng, rpki.oids
+import rpki.relaxng, rpki.oids, rpki.log
os.environ["TZ"] = "UTC"
time.tzset()
@@ -41,7 +42,7 @@ def usage(code):
yaml_file = "testpoke.yaml"
yaml_cmd = None
-opts,argv = getopt.getopt(sys.argv[1:], "y:r:h?", ["yaml=", "request=", "help"])
+opts,argv = getopt.getopt(sys.argv[1:], "y:r:h?d", ["yaml=", "request=", "help", "debug"])
for o,a in opts:
if o in ("-h", "--help", "-?"):
usage(0)
@@ -49,6 +50,8 @@ for o,a in opts:
yaml_file = a
elif o in ("-r", "--request"):
yaml_cmd = a
+ elif o in ("-d", "--debug"):
+ rpki.log.init("testpoke")
if argv:
usage(1)
@@ -125,7 +128,7 @@ cms_cert = get_PEM("cms-cert", rpki.x509.X509)
cms_key = get_PEM("cms-key", rpki.x509.RSA)
cms_certs = get_PEM_chain("cms-cert-chain", cms_cert)
-https_ta = get_PEM("ssl-ta", rpki.x509.X509)
+https_ta = get_PEM("ssl-ca-cert", rpki.x509.X509)
https_key = get_PEM("ssl-key", rpki.x509.RSA)
https_cert = get_PEM("ssl-cert", rpki.x509.X509)
https_certs = get_PEM_chain("ssl-cert-chain", https_cert)