diff options
Diffstat (limited to 'rpkid/rpki/x509.py')
-rw-r--r-- | rpkid/rpki/x509.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py index 29470c31..abdd9194 100644 --- a/rpkid/rpki/x509.py +++ b/rpkid/rpki/x509.py @@ -1385,7 +1385,10 @@ class XML_CMS_object(CMS_object): Wrap an XML PDU in CMS and return its DER encoding. """ rpki.log.trace() - self.set_content(msg.toXML()) + if self.saxify is None: + self.set_content(msg) + else: + self.set_content(msg.toXML()) self.schema_check() self.sign(keypair, certs, crls) if self.dump_outbound_cms: @@ -1400,14 +1403,17 @@ class XML_CMS_object(CMS_object): self.dump_inbound_cms.dump(self) self.verify(ta) self.schema_check() - return self.saxify(self.get_content()) + if self.saxify is None: + return self.get_content() + else: + return self.saxify(self.get_content()) ## @var saxify # SAX handler hook. Subclasses can set this to a SAX handler, in # which case .unwrap() will call it and return the result. # Otherwise, .unwrap() just returns a verified element tree. - saxify = staticmethod(lambda x: x) + saxify = None class Ghostbuster(CMS_object): """ |