aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2009-08-29 00:33:21 +0000
committerRob Austein <sra@hactrn.net>2009-08-29 00:33:21 +0000
commitdc3c4eaeb57ad3eee232ec7b4d44e3084975a650 (patch)
tree78e068a63ccde30a89d826773136b69771421ffe
parentfaee471a496a136575df23ad3ebacfe69a6f2ae4 (diff)
Cleanup
svn path=/myrpki/yamltest.py; revision=2718
-rw-r--r--myrpki/yamltest.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/myrpki/yamltest.py b/myrpki/yamltest.py
index 1c29a05b..54e0c07b 100644
--- a/myrpki/yamltest.py
+++ b/myrpki/yamltest.py
@@ -396,6 +396,7 @@ class allocation(object):
r["rootd", "rpki-base-uri"] = "rsync://%s/" % root_path
r["rootd", "rpki-root-cert"] = "publication/root.cer"
r["rootd", "rpki-root-cert-uri"] = "rsync://%s/root.cer" % root_path
+ r["rootd", "rpki-subject-cert"] = "%s.cer" % self.name
r["rpki_x509_extensions", "subjectInfoAccess"] = "1.3.6.1.5.5.7.48.5;URI:rsync://%s/,1.3.6.1.5.5.7.48.10;URI:rsync://%s/root.mnf" % (root_path, root_path)
if self.runs_pubd():
@@ -629,6 +630,12 @@ rootd_openssl("x509", "-req", "-sha256", "-outform", "DER",
progs = []
+def all_daemons_running():
+ for p in progs:
+ if p.poll() is not None:
+ return False
+ return True
+
try:
print "Running daemons"
progs.append(db.root.run_rootd())
@@ -640,6 +647,8 @@ try:
print "Giving daemons time to start up"
time.sleep(20)
+ assert all_daemons_running()
+
# Run myirbe again for each host, to set up IRDB and RPKI objects.
# Need to run a second time to push BSC certs out to rpkid. Nothing
# should happen on the third pass. Oops, when hosting we need to
@@ -657,7 +666,7 @@ try:
# Wait until something terminates.
signal.signal(signal.SIGCHLD, lambda *dont_care: None)
- if not [p for p in progs if p.poll() is not None]:
+ if all_daemons_running():
signal.pause()
finally:
iteral.String.Delimiter */ .highlight .sd { color: #D20; background-color: #FFF0F0 } /* Literal.String.Doc */ .highlight .s2 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Double */ .highlight .se { color: #04D; background-color: #FFF0F0 } /* Literal.String.Escape */ .highlight .sh { color: #D20; background-color: #FFF0F0 } /* Literal.String.Heredoc */ .highlight .si { color: #33B; background-color: #FFF0F0 } /* Literal.String.Interpol */ .highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
# $Id$
# 
# Copyright (C) 2012  Internet Systems Consortium ("ISC")
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# 
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

"""
Show tracking data for a bunch of objects retrieved by rcynic.

This script takes one required argument, which is the name of a
directory tree containing the validated outpt of an rcynic run.  If
you follow the default naming scheme this will be
/some/where/rcynic-data/authenticated.
"""

import os
import sys
import rpki.x509
import rpki.sundial

rcynic_dir = sys.argv[1]

for root, dirs, files in os.walk(rcynic_dir):
  for f in files:
    path = os.path.join(root, f)
    date = rpki.sundial.datetime.utcfromtimestamp(os.stat(path).st_mtime)
    uri = "rsync://" + path[len(rcynic_dir):].lstrip("/")
    obj = rpki.x509.uri_dispatch(uri)(DER_file = path)
    print date, obj.tracking_data(uri)