diff options
author | Rob Austein <sra@hactrn.net> | 2007-12-24 07:35:25 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-12-24 07:35:25 +0000 |
commit | 0b9d273ed65a77d480f789ab77107e73af55fd1c (patch) | |
tree | df9236ebe9da4f4c702b860b462a0f93f724092b /scripts | |
parent | 3b26727b8b5c48e783be35cc821193aa4086d48b (diff) |
Rename testroot => rootd
svn path=/scripts/Makefile; revision=1437
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile | 2 | ||||
-rw-r--r-- | scripts/apnic-poke-1.sh | 20 | ||||
-rw-r--r-- | scripts/biz-certs/Bob-CA.srl | 2 | ||||
-rw-r--r-- | scripts/http-client.py | 2 | ||||
-rw-r--r-- | scripts/rootd.cer (renamed from scripts/testroot.cer) | 0 | ||||
-rw-r--r-- | scripts/rootd.cnf (renamed from scripts/testroot.cnf) | 2 | ||||
-rw-r--r-- | scripts/rootd.key (renamed from scripts/testroot.key) | 0 | ||||
-rwxr-xr-x | scripts/rootd.py (renamed from scripts/testroot.py) | 26 | ||||
-rw-r--r-- | scripts/rootd.sh (renamed from scripts/testroot.sh) | 18 | ||||
-rw-r--r-- | scripts/testbed.py | 4 |
10 files changed, 38 insertions, 38 deletions
diff --git a/scripts/Makefile b/scripts/Makefile index 8133d691..f582c06e 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -51,4 +51,4 @@ rpki/relaxng.py: left-right-schema.rng up-down-schema.rng make-relaxng.py python make-relaxng.py >$@.tmp mv $@.tmp $@ -test:: all ; sh -x testroot.sh run +test:: all ; sh -x rootd.sh run diff --git a/scripts/apnic-poke-1.sh b/scripts/apnic-poke-1.sh index d56a694b..f59dcc80 100644 --- a/scripts/apnic-poke-1.sh +++ b/scripts/apnic-poke-1.sh @@ -14,16 +14,16 @@ openssl=../openssl/openssl/apps/openssl set -ex -# Generate new key and cert for testroot.py if needed +# Generate new key and cert for rootd.py if needed -if test ! -r testroot.cer -o ! -r testroot.key +if test ! -r rootd.cer -o ! -r rootd.key then - $openssl req -new -newkey rsa:2048 -nodes -keyout testroot.key -out testroot.req -config testroot.cnf + $openssl req -new -newkey rsa:2048 -nodes -keyout rootd.key -out rootd.req -config rootd.cnf - $openssl x509 -req -in testroot.req -out testroot.cer -extfile testroot.cnf -extensions req_x509_ext \ - -signkey testroot.key -text -sha256 + $openssl x509 -req -in rootd.req -out rootd.cer -extfile rootd.cnf -extensions req_x509_ext \ + -signkey rootd.key -text -sha256 - rm -f testroot.req + rm -f rootd.req fi # Blow away old rpkid database (!) so we can start clean @@ -65,7 +65,7 @@ rm -f bsc.req bsc.cer python irbe-cli.py repository --self_id 1 --action create --bsc_id 1 -# Create a parent context pointing at testroot.py +# Create a parent context pointing at rootd.py python irbe-cli.py parent --self_id 1 --action create --bsc_id 1 --repository_id 1 \ --peer_contact_uri https://localhost:44333/ \ @@ -82,12 +82,12 @@ python irbe-cli.py child --self_id 1 --action create --bsc_id 1 --cms_ta biz-cer if test -n "$STY" then - screen python testroot.py + screen python rootd.py screen python irdb.py else - python testroot.py >>testroot.log 2>&1 & testroot=$! + python rootd.py >>rootd.log 2>&1 & rootd=$! python irdb.py >>irdb.log 2>&1 & irdb=$! - trap "kill $rpkid $irdb $testroot" 0 1 2 3 13 15 + trap "kill $rpkid $irdb $rootd" 0 1 2 3 13 15 fi python http-client.py diff --git a/scripts/biz-certs/Bob-CA.srl b/scripts/biz-certs/Bob-CA.srl index 2d52136c..29ac2a7a 100644 --- a/scripts/biz-certs/Bob-CA.srl +++ b/scripts/biz-certs/Bob-CA.srl @@ -1 +1 @@ -90801F1ED194555A +90801F1ED194555C diff --git a/scripts/http-client.py b/scripts/http-client.py index 880ad039..3e5ec618 100644 --- a/scripts/http-client.py +++ b/scripts/http-client.py @@ -8,7 +8,7 @@ Usage: python http-client [ { -c | --config } configfile ] Default configuration file is http-demo.conf, override with --config option. """ -import rpki.config, rpki.https, getopt +import rpki.config, rpki.https, getopt, sys msg = "This is a test. This is only a test. Had this been real you would now be really confused.\n" diff --git a/scripts/testroot.cer b/scripts/rootd.cer index 205fee80..205fee80 100644 --- a/scripts/testroot.cer +++ b/scripts/rootd.cer diff --git a/scripts/testroot.cnf b/scripts/rootd.cnf index c8e3db65..1e400c04 100644 --- a/scripts/testroot.cnf +++ b/scripts/rootd.cnf @@ -1,6 +1,6 @@ # $Id$ # -# Generate test root resource certificate for use with testroot.py server. +# Generate test root resource certificate for use with rootd.py server. [ req ] default_bits = 2048 diff --git a/scripts/testroot.key b/scripts/rootd.key index d97fc64d..d97fc64d 100644 --- a/scripts/testroot.key +++ b/scripts/rootd.key diff --git a/scripts/testroot.py b/scripts/rootd.py index 831ee3d5..02d6322b 100755 --- a/scripts/testroot.py +++ b/scripts/rootd.py @@ -5,9 +5,9 @@ Trivial RPKI up-down protocol root server, for testing. Not suitable for production use. Overrides a bunch of method definitions from the rpki.* classes in order to reuse as much code as possible. -Usage: python testroot.py [ { -c | --config } configfile ] [ { -h | --help } ] +Usage: python rootd.py [ { -c | --config } configfile ] [ { -h | --help } ] -Default configuration file is testroot.conf, override with --config option. +Default configuration file is rootd.conf, override with --config option. """ import traceback, os, time, getopt, sys, lxml @@ -15,9 +15,9 @@ 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, rpki.log -root_name = "wombat" -root_base = "rsync://" + root_name + ".invalid/" -root_cert = root_base + "testroot.cer" +rootd_name = "wombat" +rootd_base = "rsync://" + rootd_name + ".invalid/" +rootd_cert = rootd_base + "rootd.cer" rpki_subject_lifetime = rpki.sundial.timedelta(days = 30) @@ -45,15 +45,15 @@ def stash_subject_pkcs10(pkcs10): def compose_response(r_msg): rc = rpki.up_down.class_elt() - rc.class_name = root_name - rc.cert_url = rpki.up_down.multi_uri(root_cert) + rc.class_name = rootd_name + rc.cert_url = rpki.up_down.multi_uri(rootd_cert) rc.from_resource_bag(rpki_issuer.get_3779resources()) rc.issuer = rpki_issuer r_msg.payload.classes.append(rc) rpki_subject = get_subject_cert() if rpki_subject is not None: rc.certs.append(rpki.up_down.certificate_elt()) - rc.certs[0].cert_url = rpki.up_down.multi_uri(root_base + rpki_subject.gSKI() + ".cer") + rc.certs[0].cert_url = rpki.up_down.multi_uri(rootd_base + rpki_subject.gSKI() + ".cer") rc.certs[0].cert = rpki_subject class list_pdu(rpki.up_down.list_pdu): @@ -71,12 +71,12 @@ class issue_pdu(rpki.up_down.issue_pdu): resources = rpki_issuer.get_3779resources() req_key = self.pkcs10.getPublicKey() req_sia = self.pkcs10.get_SIA() - crldp = root_base + rpki_issuer.gSKI() + ".crl" + crldp = rootd_base + rpki_issuer.gSKI() + ".crl" set_subject_cert(rpki_issuer.issue(keypair = rpki_key, subject_key = req_key, serial = int(time.time()), sia = req_sia, - aia = root_cert, + aia = rootd_cert, crldp = crldp, resources = resources, notAfter = rpki.sundial.datetime.utcnow() + rpki_subject_lifetime)) @@ -138,9 +138,9 @@ def up_down_handler(query, path): os.environ["TZ"] = "UTC" time.tzset() -rpki.log.init("testroot") +rpki.log.init("rootd") -cfg_file = "testroot.conf" +cfg_file = "rootd.conf" opts,argv = getopt.getopt(sys.argv[1:], "c:h?", ["config=", "help"]) for o,a in opts: @@ -153,7 +153,7 @@ if argv: raise RuntimeError, "Unexpected arguments %s" % argv cfg = rpki.config.parser(cfg_file) -section = "testroot" +section = "rootd" cms_ta = rpki.x509.X509(Auto_file = cfg.get(section, "cms-ta")) cms_key = rpki.x509.RSA(Auto_file = cfg.get(section, "cms-key")) diff --git a/scripts/testroot.sh b/scripts/rootd.sh index 4fdb1058..2b8fd07d 100644 --- a/scripts/testroot.sh +++ b/scripts/rootd.sh @@ -1,7 +1,7 @@ #!/bin/sh - # $Id$ # -# Script to test against testroot.py. +# Script to test against rootd.py. # # This blows away rpkid's database and rebuilds it with what we need # for this test, and knows far too much about the id numbers that @@ -14,13 +14,13 @@ openssl=../openssl/openssl/apps/openssl set -e -# Generate new key and cert for testroot.py if needed +# Generate new key and cert for rootd.py if needed -if test ! -r testroot.cer -o ! -r testroot.key +if test ! -r rootd.cer -o ! -r rootd.key then - $openssl req -new -newkey rsa:2048 -nodes -keyout testroot.key -out testroot.req -config testroot.cnf - $openssl x509 -req -in testroot.req -out testroot.cer -extfile testroot.cnf -extensions req_x509_ext -signkey testroot.key -text -sha256 - rm -f testroot.req + $openssl req -new -newkey rsa:2048 -nodes -keyout rootd.key -out rootd.req -config rootd.cnf + $openssl x509 -req -in rootd.req -out rootd.cer -extfile rootd.cnf -extensions req_x509_ext -signkey rootd.key -text -sha256 + rm -f rootd.req fi # Blow away old rpkid database (!) so we can start clean @@ -49,7 +49,7 @@ rm -f bsc.req bsc.cer time python irbe-cli.py repository --self_id 1 --action create --bsc_id 1 -# Create a parent context pointing at testroot.py +# Create a parent context pointing at rootd.py time python irbe-cli.py parent --self_id 1 --action create --bsc_id 1 --repository_id 1 \ --peer_contact_uri https://localhost:44333/ \ @@ -77,9 +77,9 @@ then rm -rf publication - python testroot.py & testroot=$! + python rootd.py & rootd=$! python irdb.py & irdb=$! - trap "kill $rpkid $irdb $testroot" 0 1 2 3 13 15 + trap "kill $rpkid $irdb $rootd" 0 1 2 3 13 15 : Waiting to let daemons start up; sleep 5 diff --git a/scripts/testbed.py b/scripts/testbed.py index 9fe8ae25..67d60fa3 100644 --- a/scripts/testbed.py +++ b/scripts/testbed.py @@ -47,7 +47,7 @@ prog_python = cfg.get(cfg_section, "prog_python", "python") prog_rpkid = cfg.get(cfg_section, "prog_rpkid", "../rpkid.py") prog_irdbd = cfg.get(cfg_section, "prog_irdbd", "../irdb.py") prog_poke = cfg.get(cfg_section, "prog_poke", "../testpoke.py") -prog_rootd = cfg.get(cfg_section, "prog_rootd", "../testroot.py") +prog_rootd = cfg.get(cfg_section, "prog_rootd", "../rootd.py") prog_openssl = cfg.get(cfg_section, "prog_openssl", "../../openssl/openssl/apps/openssl") rpki_sql_file = cfg.get(cfg_section, "rpki_sql_file", "../docs/rpki-db-schema.sql") @@ -695,7 +695,7 @@ https-url = https://localhost:%(rpki_port)d/left-right rootd_fmt_1 = '''\ -[testroot] +[rootd] cms-key = %(rootd_name)s-EE.key cms-cert.0 = %(rootd_name)s-EE.cer |