aboutsummaryrefslogtreecommitdiff
path: root/rpkid
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid')
-rw-r--r--rpkid/rpki/config.py2
-rw-r--r--rpkid/rpki/x509.py4
-rw-r--r--rpkid/tests/yamltest.py10
3 files changed, 12 insertions, 4 deletions
diff --git a/rpkid/rpki/config.py b/rpkid/rpki/config.py
index 421df487..6be7558e 100644
--- a/rpkid/rpki/config.py
+++ b/rpkid/rpki/config.py
@@ -287,7 +287,7 @@ class parser(object):
pass
try:
- rpki.x509.generate_insecure_debug_only_rsa_key = rpki.x509.insecure_debug_only_rsa_key_generator(self.get("insecure-debug-only-rsa-key-db"))
+ rpki.x509.generate_insecure_debug_only_rsa_key = rpki.x509.insecure_debug_only_rsa_key_generator(*self.get("insecure-debug-only-rsa-key-db").split())
except ConfigParser.NoOptionError:
pass
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py
index 8e8ad604..3c4fb0ef 100644
--- a/rpkid/rpki/x509.py
+++ b/rpkid/rpki/x509.py
@@ -949,9 +949,9 @@ generate_insecure_debug_only_rsa_key = None
class insecure_debug_only_rsa_key_generator(object):
- def __init__(self, filename):
+ def __init__(self, filename, keyno = 0):
import gdbm
- self.keyno = 0
+ self.keyno = long(keyno)
self.filename = filename
self.db = gdbm.open(filename, "c")
diff --git a/rpkid/tests/yamltest.py b/rpkid/tests/yamltest.py
index 6d4a6381..47c53c19 100644
--- a/rpkid/tests/yamltest.py
+++ b/rpkid/tests/yamltest.py
@@ -168,6 +168,7 @@ class allocation(object):
pubd_port = -1
rsync_port = -1
rootd_port = -1
+ rpkic_counter = 0L
@classmethod
def allocate_port(cls):
@@ -429,6 +430,11 @@ class allocation(object):
"comment = RPKI test"))
f.close()
+ @classmethod
+ def next_rpkic_counter(cls):
+ cls.rpkic_counter += 10000
+ return str(cls.rpkic_counter)
+
def run_rpkic(self, *args):
"""
Run rpkic for this entity.
@@ -439,7 +445,9 @@ class allocation(object):
cmd.append(self.path("rpkic.%s.prof" % rpki.sundial.now()))
cmd.extend(a for a in args if a is not None)
print 'Running "%s"' % " ".join(cmd)
- subprocess.check_call(cmd, cwd = self.host.path())
+ env = os.environ.copy()
+ env["YAMLTEST_RPKIC_COUNTER"] = self.next_rpkic_counter()
+ subprocess.check_call(cmd, cwd = self.host.path(), env = env)
def run_python_daemon(self, prog):
"""