diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-08 12:29:28 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-08 13:53:45 +0100 |
commit | 1eda4ad5bab6ac65c0c61bbbef6946129566b7cc (patch) | |
tree | f9fa712c38b2a56040746d024ddff2e47cf6a2ec /xmlsecurity | |
parent | sequence->vector in basic (diff) | |
download | core-1eda4ad5bab6ac65c0c61bbbef6946129566b7cc.tar.gz core-1eda4ad5bab6ac65c0c61bbbef6946129566b7cc.zip |
xmlsecurity: initial WriteOOXMLSignature()
Change-Id: I368a0254a8c8eff0ec7c56ecec4c0a462ae32252
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 3 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.hxx | 3 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 8 |
3 files changed, 14 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index bea6ed7ffbdb..f65324819fbd 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -506,6 +506,9 @@ bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(css::uno::Reference<css::e xSaxWriter->startElement(TAG_SIGNATURE, uno::Reference<xml::sax::XAttributeList>(pAttributeList)); mbError = false; + uno::Reference<xml::sax::XDocumentHandler> xDocumentHandler(xSaxWriter, uno::UNO_QUERY); + if (!mpXSecController->WriteOOXMLSignature(xDocumentHandler)) + mbError = true; xSaxWriter->endElement(TAG_SIGNATURE); xSaxWriter->endDocument(); diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx index 769e6b2703ef..ff7ee0e72890 100644 --- a/xmlsecurity/source/helper/xsecctl.hxx +++ b/xmlsecurity/source/helper/xsecctl.hxx @@ -503,6 +503,9 @@ public: */ virtual void SAL_CALL signatureVerified( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus nResult ) throw (com::sun::star::uno::RuntimeException, std::exception) override; + + /// Writes XML elements inside a single OOXML signature's <Signature> element. + bool WriteOOXMLSignature(const css::uno::Reference<css::xml::sax::XDocumentHandler>& xDocumentHandler); }; #endif diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index 29ea604eb788..8b658df31cb2 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -32,6 +32,7 @@ #include <stdio.h> +using namespace com::sun::star; namespace cssu = com::sun::star::uno; namespace cssl = com::sun::star::lang; namespace cssxc = com::sun::star::xml::crypto; @@ -356,4 +357,11 @@ bool XSecController::WriteSignature( return rc; } +bool XSecController::WriteOOXMLSignature(const uno::Reference<xml::sax::XDocumentHandler>& /*xDocumentHandler*/) +{ + bool bRet = false; + + return bRet; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |