diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-08 16:12:58 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-08 16:44:25 +0100 |
commit | dd641965351b2b83e4ffc7ba7a97ace318765dcb (patch) | |
tree | dacf5c7ede786ecdfd474f99e2256f1ff00e1015 /xmlsecurity | |
parent | 349a0ddc316bfab61a0989eb7658fe82972fbd43 (diff) |
xmlsecurity: fix reference type of OOXML idSignedProperties
Change-Id: I5a2924c3c0af02a4630921bae6117f11655206c2
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index cd1f7e35494a..cffb2987d7b4 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -1000,10 +1000,23 @@ void XSecController::exportOOXMLSignature(const uno::Reference<xml::sax::XDocume { { std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); - pAttributeList->AddAttribute("Type", "http://www.w3.org/2000/09/xmldsig#Object"); + if (rReference.ouURI != "#idSignedProperties") + pAttributeList->AddAttribute("Type", "http://www.w3.org/2000/09/xmldsig#Object"); + else + pAttributeList->AddAttribute("Type", "http://uri.etsi.org/01903#SignedProperties"); pAttributeList->AddAttribute(ATTR_URI, rReference.ouURI); xDocumentHandler->startElement(TAG_REFERENCE, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); } + if (rReference.ouURI == "#idSignedProperties") + { + xDocumentHandler->startElement(TAG_TRANSFORMS, uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList())); + std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); + pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_C14N); + xDocumentHandler->startElement(TAG_TRANSFORM, uno::Reference<xml::sax::XAttributeList>(pAttributeList.release())); + xDocumentHandler->endElement(TAG_TRANSFORM); + xDocumentHandler->endElement(TAG_TRANSFORMS); + } + { std::unique_ptr<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute(ATTR_ALGORITHM, ALGO_XMLDSIGSHA256); |