aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpkid/pubd.py1
-rw-r--r--rpkid/rpki/publication.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/rpkid/pubd.py b/rpkid/pubd.py
index db98faeb..386d2f06 100644
--- a/rpkid/pubd.py
+++ b/rpkid/pubd.py
@@ -61,6 +61,7 @@ class pubd_context(object):
self.https_server_port = int(cfg.get("server-port", "4434"))
self.publication_base = cfg.get("publication-base", "publication/")
+ self.publication_multimodule = cfg.getboolean("publication-multimodule", False)
def handler_common(self, query, client, cb, certs, crl = None):
"""
diff --git a/rpkid/rpki/publication.py b/rpkid/rpki/publication.py
index 38294d59..04095c26 100644
--- a/rpkid/rpki/publication.py
+++ b/rpkid/rpki/publication.py
@@ -254,7 +254,8 @@ class publication_object_elt(rpki.xml_utils.base_elt, publication_namespace):
if not self.uri.startswith("rsync://"):
raise rpki.exceptions.BadURISyntax, self.uri
u = 0
- for i in xrange(4):
+ n = 3 if self.gctx.publication_multimodule else 4
+ for i in xrange(n):
u = self.uri.index("/", u + 1)
filename = self.gctx.publication_base.rstrip("/") + self.uri[u:]
if "//" in filename or "/../" in filename or filename.endswith("/.."):