From f0c1805bbb297941fa33d73f16312a5decae12c2 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 9 Oct 2007 20:37:25 +0000 Subject: Sign the manifest svn path=/scripts/manifests.py; revision=1142 --- scripts/manifests.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts/manifests.py') diff --git a/scripts/manifests.py b/scripts/manifests.py index 38c35948..2d5071c2 100644 --- a/scripts/manifests.py +++ b/scripts/manifests.py @@ -2,14 +2,23 @@ import rpki.x509, rpki.manifest, time, glob, os +def dumpasn1(thing): + i,o = os.popen4(("dumpasn1", "-a", "-")) + i.write(thing) + i.close() + print "\n".join(x for x in o.read().splitlines() if x.startswith(" ")) + o.close() + m = rpki.x509.SignedManifest() m.build(serial = 17, nextUpdate = time.time() + 24 * 60 * 60, names_and_objs = [(fn, rpki.x509.X509(Auto_file = fn)) for fn in glob.glob("resource-cert-samples/*.cer")]) -i,o = os.popen4(("dumpasn1", "-a", "-")) -i.write(m.get_content().toString()) -i.close() -print "\n".join(x for x in o.read().splitlines() if x.startswith(" ")) -o.close() +#dumpasn1(m.get_content().toString()) + +m.sign(keypair = rpki.x509.RSA(Auto_file = "biz-certs/Alice-EE.key"), + certs = rpki.x509.X509_chain(Auto_files = ("biz-certs/Alice-EE.cer", "biz-certs/Alice-CA.cer"))) + +print m.get_PEM() +dumpasn1(m.get_DER()) -- cgit v1.2.3