diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/cross_certify.py | 4 | ||||
-rw-r--r-- | scripts/format-application-x-rpki.py | 8 | ||||
-rw-r--r-- | scripts/missing-oids.py | 6 | ||||
-rw-r--r-- | scripts/x509-dot.py | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/scripts/cross_certify.py b/scripts/cross_certify.py index 752fba55..2c4614cb 100644 --- a/scripts/cross_certify.py +++ b/scripts/cross_certify.py @@ -14,7 +14,7 @@ Usage: python cross_certify.py { -i | --in } input_cert $Id$ -Copyright (C) 2009 Internet Systems Consortium ("ISC") +Copyright (C) 2009-2011 Internet Systems Consortium ("ISC") Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -43,7 +43,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ -import os, time, getopt, sys, POW, rpki.x509, rpki.sundial +import os, time, getopt, sys, rpki.x509, rpki.sundial os.environ["TZ"] = "UTC" time.tzset() diff --git a/scripts/format-application-x-rpki.py b/scripts/format-application-x-rpki.py index 8807f2ee..a7e58f49 100644 --- a/scripts/format-application-x-rpki.py +++ b/scripts/format-application-x-rpki.py @@ -22,7 +22,7 @@ PERFORMANCE OF THIS SOFTWARE. """ import email.mime, email.mime.application, email.mime.text, email.mime.multipart, email.utils, email.encoders -import mailbox, POW, lxml.etree, getopt, sys, base64 +import mailbox, rpki.POW, lxml.etree, getopt, sys, base64 source_name = None destination_name = None @@ -56,7 +56,7 @@ if argv or source_name is None or destination_name is None: usage(ok = False) def pprint_cert(b64): - return POW.derRead(POW.X509_CERTIFICATE, base64.b64decode(b64)).pprint() + return rpki.POW.derRead(rpki.POW.X509_CERTIFICATE, base64.b64decode(b64)).pprint() def up_down(): msg["X-RPKI-Up-Down-Type"] = xml.get("type") @@ -101,8 +101,8 @@ try: continue assert not srcmsg.is_multipart() and srcmsg.get_content_type() == "application/x-rpki" payload = srcmsg.get_payload(decode = True) - cms = POW.derRead(POW.CMS_MESSAGE, payload) - txt = cms.verify(POW.X509Store(), None, POW.CMS_NOCRL | POW.CMS_NO_SIGNER_CERT_VERIFY | POW.CMS_NO_ATTR_VERIFY | POW.CMS_NO_CONTENT_VERIFY) + cms = rpki.POW.derRead(rpki.POW.CMS_MESSAGE, payload) + txt = cms.verify(rpki.POW.X509Store(), None, rpki.POW.CMS_NOCRL | rpki.POW.CMS_NO_SIGNER_CERT_VERIFY | rpki.POW.CMS_NO_ATTR_VERIFY | rpki.POW.CMS_NO_CONTENT_VERIFY) xml = lxml.etree.fromstring(txt) tag = xml.tag if target_tag and tag != target_tag: diff --git a/scripts/missing-oids.py b/scripts/missing-oids.py index f5571753..e442828a 100644 --- a/scripts/missing-oids.py +++ b/scripts/missing-oids.py @@ -18,15 +18,15 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ -import POW.pkix, rpki.oids +import rpki.POW.pkix, rpki.oids need_header = True for oid, name in rpki.oids.oid2name.items(): try: - POW.pkix.oid2obj(oid) + rpki.POW.pkix.oid2obj(oid) except: - o = POW.pkix.Oid() + o = rpki.POW.pkix.Oid() o.set(oid) if need_header: print diff --git a/scripts/x509-dot.py b/scripts/x509-dot.py index 5eb58ff9..9ad5b79d 100644 --- a/scripts/x509-dot.py +++ b/scripts/x509-dot.py @@ -3,7 +3,7 @@ """ Generate .dot description of a certificate tree. -Copyright (C) 2009-2010 Internet Systems Consortium ("ISC") +Copyright (C) 2009-2011 Internet Systems Consortium ("ISC") Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -32,7 +32,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ -import POW, sys, glob, os +import rpki.POW, sys, glob, os class x509(object): @@ -61,9 +61,9 @@ class x509(object): f.close() if "-----BEGIN" in text: - self.pow = POW.pemRead(POW.X509_CERTIFICATE, text) + self.pow = rpki.POW.pemRead(rpki.POW.X509_CERTIFICATE, text) else: - self.pow = POW.derRead(POW.X509_CERTIFICATE, text) + self.pow = rpki.POW.derRead(rpki.POW.X509_CERTIFICATE, text) self.extensions = dict((e[0], e[2]) for e in (self.pow.getExtension(i) for i in xrange(self.pow.countExtensions()))) |