aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2010-03-09 21:42:06 +0000
committerRob Austein <sra@hactrn.net>2010-03-09 21:42:06 +0000
commita6395141da84d665beba002e93952ea72d4942c6 (patch)
treeaf4270b4ab286b31a742224ee78cdf81d3341de5
parentc66e08261b05c28e782517e49c48cf047c300f2d (diff)
Cleanup
svn path=/myrpki.rototill/convert-csv.py; revision=3054
-rw-r--r--myrpki.rototill/convert-csv.py13
-rw-r--r--myrpki.rototill/examples/myrpki.conf13
-rw-r--r--myrpki.rototill/myrpki.py4
3 files changed, 12 insertions, 18 deletions
diff --git a/myrpki.rototill/convert-csv.py b/myrpki.rototill/convert-csv.py
index 8ae0d312..9954df60 100644
--- a/myrpki.rototill/convert-csv.py
+++ b/myrpki.rototill/convert-csv.py
@@ -43,8 +43,11 @@ bpki_resources_directory = cfg.get("bpki_resources_directory")
bpki_servers_directory = cfg.get("bpki_servers_directory")
repository_bpki_certificate = cfg.get("repository_bpki_certificate")
repository_handle = cfg.get("repository_handle")
-pubd_base = cfg.get("pubd_base")
-rpkid_base = cfg.get("rpkid_base")
+
+pubd_server_host = cfg.get("pubd_server_host")
+pubd_server_port = cfg.get("pubd_server_port")
+rpkid_server_host = cfg.get("rpkid_server_host")
+rpkid_server_port = cfg.get("rpkid_server_port")
bpki_resources_pemfile = bpki_resources_directory + "/ca.cer"
bpki_servers_pemfile = bpki_servers_directory + "/ca.cer"
@@ -54,7 +57,7 @@ if os.path.exists("children.csv"):
e = Element("parent",
valid_until = valid_until,
- service_uri = "%s/left-right/%s/%s" % (rpkid_base, handle, child_handle),
+ service_uri = "https://%s:%s/left-right/%s/%s" % (rpkid_server_host, rpkid_server_port, handle, child_handle),
child_handle = child_handle,
parent_handle = handle)
myrpki.PEMElement(e, "bpki_resource_ta", bpki_resources_pemfile)
@@ -82,7 +85,7 @@ if os.path.exists("parents.csv"):
e = Element("repository",
parent_handle = parent_handle,
client_handle = client_handle,
- service_uri = "%s/client/%s" % (pubd_base.rstrip("/"), client_handle),
+ service_uri = "https://%s:%s/client/%s" % (pubd_server_host, pubd_server_port, client_handle),
sia_base = parent_sia_base,
repository_handle = client_handle.split("/")[0],
type = "confirmed")
@@ -99,7 +102,7 @@ if os.path.exists("pubclients.csv"):
e = Element("repository",
parent_handle = parent_handle,
client_handle = client_handle,
- service_uri = "%s/client/%s" % (pubd_base.rstrip("/"), client_handle),
+ service_uri = "https://%s:%s/client/%s" % (pubd_server_host, pubd_server_port, client_handle),
sia_base = client_sia_base,
repository_handle = client_handle.split("/")[0],
type = "confirmed")
diff --git a/myrpki.rototill/examples/myrpki.conf b/myrpki.rototill/examples/myrpki.conf
index 79f1d229..dd00ca3c 100644
--- a/myrpki.rototill/examples/myrpki.conf
+++ b/myrpki.rototill/examples/myrpki.conf
@@ -120,13 +120,6 @@ publication_rsync_module = ${myrpki::handle}
publication_rsync_server = ${myrpki::pubd_server_host}
-# Don't touch these, they're here because I haven't yet updated all of
-# the myrpki tools to use the latest config file variables. These
-# will go away eventually, for now just leave them alone.
-
-pubd_base = https://${myrpki::pubd_server_host}:${myrpki::pubd_server_port}/
-rpkid_base = https://${myrpki::rpkid_server_host}:${myrpki::rpkid_server_port}
-
#################################################################
[rpkid]
@@ -139,8 +132,7 @@ sql-username = rpki
sql-password = fnord
# Host and port on which rpkid should listen for HTTPS service
-# requests. These should match rpkid_base in the [myirbe] section.
-# You need to configure these.
+# requests.
server-host = ${myrpki::rpkid_server_host}
server-port = ${myrpki::rpkid_server_port}
@@ -208,8 +200,7 @@ sql-password = fnord
publication-base = ${myrpki::publication_base_directory}
# Host and port on which pubd should listen for HTTPS service
-# requests. These should match pubd_base in the [myirbe] section.
-# You need to configure these.
+# requests.
server-host = ${myrpki::pubd_server_host}
server-port = ${myrpki::pubd_server_port}
diff --git a/myrpki.rototill/myrpki.py b/myrpki.rototill/myrpki.py
index 6e5a6eb5..c84a520b 100644
--- a/myrpki.rototill/myrpki.py
+++ b/myrpki.rototill/myrpki.py
@@ -1206,8 +1206,8 @@ class main(rpki.cli.Cmd):
self_crl_interval = self.cfg.getint("self_crl_interval", 2 * 60 * 60)
self_regen_margin = self.cfg.getint("self_regen_margin", 30 * 60)
- pubd_base = self.cfg.get("pubd_base").rstrip("/") + "/"
- rpkid_base = self.cfg.get("rpkid_base").rstrip("/") + "/"
+ pubd_base = "https://%s:%s/" % (self.cfg.get("pubd_server_host"), self.cfg.get("pubd_server_port"))
+ rpkid_base = "https://%s:%s/" % (self.cfg.get("rpkid_server_host"), self.cfg.get("rpkid_server_port"))
# Nasty regexp for parsing rpkid's up-down service URLs.