From 72d26ad5587734b848f394cec036e976024dad1d Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 28 Sep 2007 21:31:27 +0000 Subject: More fun decoding PKCS #10 svn path=/scripts/pkcs10.py; revision=1047 --- scripts/pkcs10.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts/pkcs10.py') diff --git a/scripts/pkcs10.py b/scripts/pkcs10.py index 8163cf9b..6578e4be 100644 --- a/scripts/pkcs10.py +++ b/scripts/pkcs10.py @@ -3,8 +3,8 @@ import POW.pkix, rpki.x509, glob, rpki.resource_set parse_extensions = True -list_extensions = True -show_attributes = True +list_extensions = False +show_attributes = False show_algorithm = False do_verify = True @@ -60,11 +60,9 @@ for name in glob.glob("resource-cert-samples/*.req") + glob.glob("biz-certs/*.re if v4: print "IPv4 =", v4 if v6: print "IPv6 =", v6 - for t in exts.get(): - oid = t[0] + for oid, crit, val in exts.get(): if oid in ((1, 3, 6, 1, 5, 5, 7, 1, 7), (1, 3, 6, 1, 5, 5, 7, 1, 8)): continue - val = t[2] if isinstance(val, str): val = ":".join(["%02X" % ord(i) for i in val]) print POW.pkix.oid2obj(oid), oid, "=", val -- cgit v1.2.3