aboutsummaryrefslogtreecommitdiff
path: root/scripts/manifests.py
blob: 38c35948ef8ca82cb3facd8593c010b199f05a5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# $Id$

import rpki.x509, rpki.manifest, time, glob, os

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()