aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--myrpki.rototill/examples/myrpki.conf61
-rw-r--r--myrpki.rototill/myirbe.py15
-rw-r--r--myrpki.rototill/myrpki.py2
-rw-r--r--myrpki.rototill/setup-sql.py2
-rw-r--r--myrpki.rototill/start-servers.py2
-rw-r--r--myrpki.rototill/yamltest.py12
-rw-r--r--rpkid/rpki/config.py2
7 files changed, 45 insertions, 51 deletions
diff --git a/myrpki.rototill/examples/myrpki.conf b/myrpki.rototill/examples/myrpki.conf
index d54889fd..b91c82c1 100644
--- a/myrpki.rototill/examples/myrpki.conf
+++ b/myrpki.rototill/examples/myrpki.conf
@@ -48,11 +48,8 @@ parents_csv = parents.csv
prefix_csv = prefixes.csv
asn_csv = asns.csv
xml_filename = myrpki.xml
-bpki_directory = bpki/myrpki
-#################################################################
-
-[myirbe]
+myrpki_bpki_directory = bpki/myrpki
# Base of service URL for pubd. myirbe.py uses this value to
# configure <repository/> objects in rpkid. If you are running your
@@ -96,7 +93,7 @@ want_rootd = false
# Where to put BPKI stuff for the IRBE operator (entity that operates
# rpkid etc). Don't change this without a reason.
-bpki_directory = bpki/myirbe
+myirbe_bpki_directory = bpki/myirbe
#################################################################
@@ -126,11 +123,11 @@ irdb-url = https://localhost:4403/
# left-right protocol. The following values match where myirbe.py
# will have placed things. Don't change these without a reason.
-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-rpkid-key = ${myirbe::bpki_directory}/rpkid.key
-rpkid-cert = ${myirbe::bpki_directory}/rpkid.cer
-irdb-cert = ${myirbe::bpki_directory}/irdbd.cer
-irbe-cert = ${myirbe::bpki_directory}/irbe.cer
+bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+rpkid-key = ${myrpki::myirbe_bpki_directory}/rpkid.key
+rpkid-cert = ${myrpki::myirbe_bpki_directory}/rpkid.cer
+irdb-cert = ${myrpki::myirbe_bpki_directory}/irdbd.cer
+irbe-cert = ${myrpki::myirbe_bpki_directory}/irbe.cer
#################################################################
@@ -152,10 +149,10 @@ https-url = https://localhost:4403/
# left-right protocol. The following values match where myirbe.py
# will have placed things. Don't change these without a reason.
-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-rpkid-cert = ${myirbe::bpki_directory}/rpkid.cer
-irdbd-cert = ${myirbe::bpki_directory}/irdbd.cer
-irdbd-key = ${myirbe::bpki_directory}/irdbd.key
+bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+rpkid-cert = ${myrpki::myirbe_bpki_directory}/rpkid.cer
+irdbd-cert = ${myrpki::myirbe_bpki_directory}/irdbd.cer
+irdbd-key = ${myrpki::myirbe_bpki_directory}/irdbd.key
#################################################################
@@ -189,10 +186,10 @@ server-port = 4402
# left-right protocol. The following values match where myirbe.py
# will have placed things. Don't change these without a reason.
-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-pubd-cert = ${myirbe::bpki_directory}/pubd.cer
-pubd-key = ${myirbe::bpki_directory}/pubd.key
-irbe-cert = ${myirbe::bpki_directory}/irbe.cer
+bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+pubd-cert = ${myrpki::myirbe_bpki_directory}/pubd.cer
+pubd-key = ${myrpki::myirbe_bpki_directory}/pubd.key
+irbe-cert = ${myrpki::myirbe_bpki_directory}/irbe.cer
#################################################################
@@ -204,10 +201,10 @@ rpkid-url = https://rpkid.example.org:4404/left-right/
# BPKI certificates and keys for talking to rpkid
-rpkid-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-rpkid-irbe-key = ${myirbe::bpki_directory}/irbe.key
-rpkid-irbe-cert = ${myirbe::bpki_directory}/irbe.cer
-rpkid-cert = ${myirbe::bpki_directory}/rpkid.cer
+rpkid-bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+rpkid-irbe-key = ${myrpki::myirbe_bpki_directory}/irbe.key
+rpkid-irbe-cert = ${myrpki::myirbe_bpki_directory}/irbe.cer
+rpkid-cert = ${myrpki::myirbe_bpki_directory}/rpkid.cer
# HTTPS service URL for pubd
@@ -215,10 +212,10 @@ pubd-url = https://localhost:4402/control/
# BPKI certificates and keys for talking to pubd
-pubd-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-pubd-irbe-key = ${myirbe::bpki_directory}/irbe.key
-pubd-irbe-cert = ${myirbe::bpki_directory}/irbe.cer
-pubd-cert = ${myirbe::bpki_directory}/pubd.cer
+pubd-bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+pubd-irbe-key = ${myrpki::myirbe_bpki_directory}/irbe.key
+pubd-irbe-cert = ${myrpki::myirbe_bpki_directory}/irbe.cer
+pubd-cert = ${myrpki::myirbe_bpki_directory}/pubd.cer
#################################################################
@@ -235,11 +232,11 @@ pubd-cert = ${myirbe::bpki_directory}/pubd.cer
# BPKI certificates and keys for rootd
-bpki-ta = ${myirbe::bpki_directory}/ca.cer
-rootd-bpki-crl = ${myirbe::bpki_directory}/ca.crl
-rootd-bpki-cert = ${myirbe::bpki_directory}/rootd.cer
-rootd-bpki-key = ${myirbe::bpki_directory}/rootd.key
-child-bpki-cert = ${myirbe::bpki_directory}/child.cer
+bpki-ta = ${myrpki::myirbe_bpki_directory}/ca.cer
+rootd-bpki-crl = ${myrpki::myirbe_bpki_directory}/ca.crl
+rootd-bpki-cert = ${myrpki::myirbe_bpki_directory}/rootd.cer
+rootd-bpki-key = ${myrpki::myirbe_bpki_directory}/rootd.key
+child-bpki-cert = ${myrpki::myirbe_bpki_directory}/child.cer
# Server port on which rootd should listen.
@@ -260,7 +257,7 @@ rpki-root-cert-uri = rsync://rpki.example.org/Me/root.cer
# Private key corresponding to rootd's root RPKI certificate
-rpki-root-key = ${myirbe::bpki_directory}/ca.key
+rpki-root-key = ${myrpki::myirbe_bpki_directory}/ca.key
# Filename (as opposed to rsync URI) of rootd's root RPKI certificate
diff --git a/myrpki.rototill/myirbe.py b/myrpki.rototill/myirbe.py
index ad54c9aa..3ea2dab6 100644
--- a/myrpki.rototill/myirbe.py
+++ b/myrpki.rototill/myirbe.py
@@ -132,7 +132,7 @@ for o, a in opts:
print __doc__
sys.exit(0)
-cfg = rpki.config.parser(cfg_file, "myirbe")
+cfg = rpki.config.parser(cfg_file, "myrpki")
cfg.set_global_flags()
@@ -145,7 +145,7 @@ want_rootd = cfg.getboolean("want_rootd", False)
bpki_modified = False
-bpki = myrpki.CA(cfg_file, cfg.get("bpki_directory"))
+bpki = myrpki.CA(cfg_file, cfg.get("myirbe_bpki_directory"))
bpki_modified |= bpki.setup(cfg.get("bpki_ta_dn", "/CN=%s BPKI TA" % handle))
bpki_modified |= bpki.ee( cfg.get("bpki_rpkid_ee_dn", "/CN=%s rpkid EE" % handle), "rpkid")
bpki_modified |= bpki.ee( cfg.get("bpki_irdbd_ee_dn", "/CN=%s irdbd EE" % handle), "irdbd")
@@ -208,14 +208,13 @@ cur = db.cursor()
xmlfiles = []
-# If [myrpki] section is present in config file, run myrpki.py
-# internally, as a convenience, and include its output at the head of
-# our list of XML files to process.
+# If [myrpki] section includes an "xml_filename" setting, run
+# myrpki.py internally, as a convenience, and include its output at
+# the head of our list of XML files to process.
-if cfg.has_section("myrpki"):
+if cfg.has_option("xml_filename"):
myrpki.main(("-c", cfg_file))
- my_xmlfile = cfg.get("xml_filename", None, "myrpki")
- assert my_xmlfile is not None
+ my_xmlfile = cfg.get("xml_filename")
xmlfiles.append(my_xmlfile)
# Add any other XML files specified on the command line
diff --git a/myrpki.rototill/myrpki.py b/myrpki.rototill/myrpki.py
index 7937521d..347d7e13 100644
--- a/myrpki.rototill/myrpki.py
+++ b/myrpki.rototill/myrpki.py
@@ -588,7 +588,7 @@ def main(argv = ()):
parents_csv_file = cfg.get(section, "parents_csv")
prefix_csv_file = cfg.get(section, "prefix_csv")
asn_csv_file = cfg.get(section, "asn_csv")
- bpki_dir = cfg.get(section, "bpki_directory")
+ bpki_dir = cfg.get(section, "myrpki_bpki_directory")
xml_filename = cfg.get(section, "xml_filename")
repository_bpki_certificate = cfg.get(section, "repository_bpki_certificate")
repository_handle = cfg.get(section, "repository_handle")
diff --git a/myrpki.rototill/setup-sql.py b/myrpki.rototill/setup-sql.py
index 638404d9..9d6772f8 100644
--- a/myrpki.rototill/setup-sql.py
+++ b/myrpki.rototill/setup-sql.py
@@ -94,7 +94,7 @@ for o, a in opts:
if o in ("-c", "--config"):
cfg_file = a
-cfg = rpki.config.parser(cfg_file, "myirbe")
+cfg = rpki.config.parser(cfg_file, "myrpki")
rootdb = MySQLdb.connect(db = "mysql", user = "root", passwd = getpass.getpass("Please enter your MySQL root password: "))
diff --git a/myrpki.rototill/start-servers.py b/myrpki.rototill/start-servers.py
index 6bd5493e..b551f79b 100644
--- a/myrpki.rototill/start-servers.py
+++ b/myrpki.rototill/start-servers.py
@@ -56,7 +56,7 @@ for o, a in opts:
names = ["irdbd", "rpkid"]
-cfg = rpki.config.parser(cfg_file, "myirbe")
+cfg = rpki.config.parser(cfg_file, "myrpki")
if cfg.getboolean("want_pubd", False):
names.append("pubd")
diff --git a/myrpki.rototill/yamltest.py b/myrpki.rototill/yamltest.py
index 25381ff4..8a36cf8a 100644
--- a/myrpki.rototill/yamltest.py
+++ b/myrpki.rototill/yamltest.py
@@ -387,13 +387,13 @@ class allocation(object):
if not self.is_hosted():
r["irdbd", "https-url"] = "https://localhost:%d/" % self.irdbd_port
r["irdbd", "sql-database"] = "irdb%d" % self.engine
- r["myirbe", "irdbd_conf"] = "myrpki.conf"
- r["myirbe", "rpkid_base"] = "https://localhost:%d/" % self.rpkid_port
+ r["myrpki", "irdbd_conf"] = "myrpki.conf"
+ r["myrpki", "rpkid_base"] = "https://localhost:%d/" % self.rpkid_port
r["rpkid", "irdb-url"] = "https://localhost:%d/" % self.irdbd_port
r["rpkid", "server-port"] = "%d" % self.rpkid_port
r["rpkid", "sql-database"] = "rpki%d" % self.engine
- r["myirbe", "want_pubd"] = "true" if self.runs_pubd() else "false"
- r["myirbe", "want_rootd"] = "true" if self.is_root() else "false"
+ r["myrpki", "want_pubd"] = "true" if self.runs_pubd() else "false"
+ r["myrpki", "want_rootd"] = "true" if self.is_root() else "false"
r["irbe_cli", "rpkid-url"] = "https://localhost:%d/left-right" % self.rpkid_port
if self.is_root():
@@ -415,8 +415,8 @@ class allocation(object):
s = self
while not s.runs_pubd():
s = s.parent
- r["myirbe", "pubd_base"] = "https://localhost:%d/" % s.pubd_port
- r["myirbe", "rsync_base"] = "rsync://localhost:%d/" % s.rsync_port
+ r["myrpki", "pubd_base"] = "https://localhost:%d/" % s.pubd_port
+ r["myrpki", "rsync_base"] = "rsync://localhost:%d/" % s.rsync_port
r["myrpki", "repository_bpki_certificate"] = s.path("bpki/myirbe/ca.cer")
r["myrpki", "repository_handle"] = self.client_handle
diff --git a/rpkid/rpki/config.py b/rpkid/rpki/config.py
index 6d6ad225..82a362c3 100644
--- a/rpkid/rpki/config.py
+++ b/rpkid/rpki/config.py
@@ -115,8 +115,6 @@ class parser(object):
"""
if section is None:
section = self.default_section
- if not self.cfg.has_option(section, option):
- option = option.replace("-", "_")
if default is not None and not self.cfg.has_option(section, option):
return default
val = self.cfg.get(section, option)