diff options
author | Rob Austein <sra@hactrn.net> | 2007-08-10 19:02:48 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-08-10 19:02:48 +0000 |
commit | 0b13cb5aaa9163203d9dcceeab6330922671a040 (patch) | |
tree | f424c929260840e35b9ab1a4950084ebee8d009f /scripts/pkcs10.py | |
parent | 7d9dcb03c71a1713aa27ec7d77e8fe3bed74fa0f (diff) |
Cleanup
svn path=/scripts/pkcs10.py; revision=859
Diffstat (limited to 'scripts/pkcs10.py')
-rw-r--r-- | scripts/pkcs10.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/pkcs10.py b/scripts/pkcs10.py index e788a502..738ddbaa 100644 --- a/scripts/pkcs10.py +++ b/scripts/pkcs10.py @@ -15,16 +15,19 @@ for name in glob.glob("resource-cert-samples/*.req"): print "[", name, "]" - exts = pkcs10.certificationRequestInfo.attributes.get()[0][1][0] + extc = pkcs10.certificationRequestInfo.attributes.val + exts = extc.choices[extc.choice][0] + + #print len(exts), exts[0].extnValue if parse_extensions: - as, v4, v6 = rpki.resource_set.parse_extensions(exts) + as, v4, v6 = rpki.resource_set.parse_extensions(exts.get()) if as: print "ASN =", as if v4: print "IPv4 =", v4 if v6: print "IPv6 =", v6 - for t in exts: + for t in exts.get(): oid = t[0] if oid in ((1, 3, 6, 1, 5, 5, 7, 1, 7), (1, 3, 6, 1, 5, 5, 7, 1, 8)): continue @@ -34,8 +37,7 @@ for name in glob.glob("resource-cert-samples/*.req"): print POW.pkix.oid2obj(oid), oid, "=", val if list_extensions: - extensions = pkcs10.certificationRequestInfo.attributes.sequenceOf[0].val.sequenceOf[0].sequenceOf - for x in extensions: + for x in exts: oid = x.extnID.get() name = POW.pkix.oid2obj(oid) crit = x.critical.get() |