From 2d05cab0e47ef437c3e5fa0f574f1eb4b1cfd64a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 24 Jan 2019 17:34:37 +0000 Subject: Slightly hacky but hopefully functional fix for KDMs after the changes to signer. The KDM stuff uses add_signature_value() but not sign() since it has to allow pass-through of a KDM (so it handles etc. itself). This means we have to make the indentation-adding optional. It might have been nicer to make indent() not add indentation if it's not already there. --- src/encrypted_kdm.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/encrypted_kdm.cc') diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc index 9d581451..996708ad 100644 --- a/src/encrypted_kdm.cc +++ b/src/encrypted_kdm.cc @@ -554,6 +554,7 @@ public: xmlAddID (0, document->cobj(), (const xmlChar *) i->first.c_str(), i->second->cobj ()); } + indent (document->get_root_node(), 0); return document; } @@ -670,7 +671,7 @@ EncryptedKDM::EncryptedKDM ( xmlpp::Node::NodeList children = doc->get_root_node()->get_children (); for (xmlpp::Node::NodeList::const_iterator i = children.begin(); i != children.end(); ++i) { if ((*i)->get_name() == "Signature") { - signer->add_signature_value (dynamic_cast(*i), "ds"); + signer->add_signature_value (dynamic_cast(*i), "ds", false); } } -- cgit v1.2.3