aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/x509.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2011-06-09 20:03:09 +0000
committerMichael Elkins <melkins@tislabs.com>2011-06-09 20:03:09 +0000
commitb93afda78e60236cd62bab6b27c891d721ad6c61 (patch)
treed656ebea19ca2542e03d2d3aaf52dd55504b3041 /rpkid/rpki/x509.py
parent292bcd93103dc47cf222f7c659b56efb45724501 (diff)
add preliminary support for the ghostbusters record
svn path=/rpkid/rpki/ghostbuster.py; revision=3857
Diffstat (limited to 'rpkid/rpki/x509.py')
-rw-r--r--rpkid/rpki/x509.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py
index 0fbcf073..9444ae53 100644
--- a/rpkid/rpki/x509.py
+++ b/rpkid/rpki/x509.py
@@ -46,7 +46,7 @@ PERFORMANCE OF THIS SOFTWARE.
import rpki.POW, rpki.POW.pkix, base64, lxml.etree, os, subprocess, sys
import email.mime.application, email.utils, mailbox, time
import rpki.exceptions, rpki.resource_set, rpki.oids, rpki.sundial
-import rpki.manifest, rpki.roa, rpki.log, rpki.async
+import rpki.manifest, rpki.roa, rpki.log, rpki.async, rpki.ghostbuster
def base64_with_linebreaks(der):
"""
@@ -1118,6 +1118,21 @@ class ROA(DER_CMS_object):
rpki.log.debug("ROA inner content: %r" % (r.get(),))
raise
+class Ghostbuster(DER_CMS_object):
+ """
+ Class to hold a signed Ghostbuster record.
+ """
+
+ content_class = rpki.ghostbuster.Ghostbuster
+
+ @classmethod
+ def build(cls, vcard, keypair, certs):
+ self = cls()
+ gbr = content_class(vcard)
+ self.set_content(gbr)
+ self.sign(keypair, certs)
+ return self
+
class DeadDrop(object):
"""
Dead-drop utility for storing copies of CMS messages for debugging or