diff options
author | Rob Austein <sra@hactrn.net> | 2008-04-20 08:38:11 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2008-04-20 08:38:11 +0000 |
commit | 2e30f96bfd94b3831c31e18e7d4fbdcf38dd0103 (patch) | |
tree | af095ebe8841849bdab1270bdacde79a99b66939 /rpkid/missing-oids.py | |
parent | 2f7d52b734f01869c6b2a9186700b0deaa054dcd (diff) |
Add RPKI OIDs to dumpasn1.cfg
svn path=/pow/POW-0.7/dumpasn1.cfg; revision=1684
Diffstat (limited to 'rpkid/missing-oids.py')
-rw-r--r-- | rpkid/missing-oids.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/rpkid/missing-oids.py b/rpkid/missing-oids.py new file mode 100644 index 00000000..e0667c52 --- /dev/null +++ b/rpkid/missing-oids.py @@ -0,0 +1,35 @@ +# $Id$ + +# Copyright (C) 2008 American Registry for Internet Numbers ("ARIN") +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +""" +Figure out what OIDs from rpki.oids are missing from dumpasn1's database. +""" + +import POW.pkix, rpki.oids + +print +print "# Local additions" + +for oid,name in rpki.oids.oid2name.items(): + try: + POW.pkix.oid2obj(oid) + except: + o = POW.pkix.Oid() + o.set(oid) + print + print "OID =", " ".join(("%02X" % ord(c)) for c in o.toString()) + print "Comment = RPKI project" + print "Description =", name, "(" + " ".join((str(i) for i in oid)) + ")" |