aboutsummaryrefslogtreecommitdiff
path: root/myrpki/xml-parse-test.py
diff options
context:
space:
mode:
Diffstat (limited to 'myrpki/xml-parse-test.py')
-rwxr-xr-xmyrpki/xml-parse-test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/myrpki/xml-parse-test.py b/myrpki/xml-parse-test.py
index a4608059..81ae5ea8 100755
--- a/myrpki/xml-parse-test.py
+++ b/myrpki/xml-parse-test.py
@@ -67,6 +67,17 @@ def showpem(label, b64, kind):
raise subprocess.CalledProcessError(returncode = p.returncode, cmd = cmd)
print label, text
+for x in tree.getiterator(tag("child")):
+ ta = x.findtext(tag("bpki_ta"))
+ if ta:
+ showpem("Child", ta, "x509")
+
+for x in tree.getiterator(tag("parent")):
+ print "Parent URI:", x.get("uri")
+ ta = x.findtext(tag("bpki_ta"))
+ if ta:
+ showpem("Parent", ta, "x509")
+
ca = tree.findtext(tag("bpki_ca_certificate"))
if ca:
showpem("CA", ca, "x509")