diff options
-rw-r--r-- | rp/config/rpki-confgen.xml | 4 | ||||
-rwxr-xr-x | rp/config/rpki-generate-root-certificate | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/rp/config/rpki-confgen.xml b/rp/config/rpki-confgen.xml index 29bb86b3..7257d2f5 100644 --- a/rp/config/rpki-confgen.xml +++ b/rp/config/rpki-confgen.xml @@ -934,14 +934,14 @@ </option> <option name = "rpki-root-cert-file" - value = "${rootd::rpki_data_dir}/root.cer"> + value = "${autoconf::datarootdir}/rpki/root.cer"> <doc> Filename of rootd's root RPKI certificate. </doc> </option> <option name = "rpki-root-key-file" - value = "${rootd::rpki_data_dir}/root.key"> + value = "${autoconf::datarootdir}/rpki/root.key"> <doc> Private key corresponding to rootd's root RPKI certificate. </doc> diff --git a/rp/config/rpki-generate-root-certificate b/rp/config/rpki-generate-root-certificate index 28bb1836..a1a4d3a6 100755 --- a/rp/config/rpki-generate-root-certificate +++ b/rp/config/rpki-generate-root-certificate @@ -22,12 +22,18 @@ os.environ["TZ"] = "UTC" time.tzset() cfg, parser = rpki.config.argparser(section = "rootd", doc = __doc__) + +default_certfile = cfg.get("rpki-root-cert-file", "root.cer") +default_keyfile = cfg.get("rpki-root-key-file", "root.key") +default_talfile = os.path.splitext(default_certfile)[0] + ".tal" + parser.add_argument("-a", "--asns", help = "ASN resources", default = "0-4294967295") parser.add_argument("-4", "--ipv4", help = "IPv4 resources", default = "0.0.0.0/0") parser.add_argument("-6", "--ipv6", help = "IPv6 resources", default = "::/0") -parser.add_argument("--certificate", help = "certificate file", default = cfg.get("rpki-root-cert-file", "root.cer")) -parser.add_argument("--key", help = "key file", default = cfg.get("rpki-root-key-file", "root.key")) -parser.add_argument("--tal", help = "TAL file", default = "root.tal") +parser.add_argument("--certificate", help = "certificate file", default = default_certfile) +parser.add_argument("--key", help = "key file", default = default_keyfile) +parser.add_argument("--tal", help = "TAL file", default = default_talfile) + args = parser.parse_args() resources = rpki.resource_set.resource_bag( |