diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-19 17:18:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-19 17:32:34 +0100 |
commit | 2737a187a6a7c2e04aa1c6b519a712cfb989c592 (patch) | |
tree | f088017e0e3d858c41b07f1dcf29cdd35f73f5a3 /xmlsecurity | |
parent | xmlsecurity: handle OOXML signatures in ImplGetSignatureInformations() (diff) | |
download | core-2737a187a6a7c2e04aa1c6b519a712cfb989c592.tar.gz core-2737a187a6a7c2e04aa1c6b519a712cfb989c592.zip |
xmlsecurity: import OOXML <mdssi:Value>
That stores the signature timestamp, and that now immediately shows up
in DigitalSignaturesDialog as well.
Change-Id: I83a63a10cf946f47a03e4570c461a92512638600
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.cxx | 13 | ||||
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.hxx | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx index e47f9dddc6c2..d8b5c932dc58 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.cxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx @@ -17,6 +17,7 @@ OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController) ,m_bInDigestValue(false) ,m_bInSignatureValue(false) ,m_bInX509Certificate(false) + ,m_bInMdssiValue(false) { } @@ -71,6 +72,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) m_aX509Certificate.clear(); m_bInX509Certificate = true; } + else if (rName == "mdssi:Value") + { + m_aMdssiValue.clear(); + m_bInMdssiValue = true; + } if (m_xNextHandler.is()) m_xNextHandler->startElement(rName, xAttribs); @@ -94,6 +100,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax: m_pXSecController->setX509Certificate(m_aX509Certificate); m_bInX509Certificate = false; } + else if (rName == "mdssi:Value") + { + m_pXSecController->setDate(m_aMdssiValue); + m_bInMdssiValue = false; + } if (m_xNextHandler.is()) m_xNextHandler->endElement(rName); @@ -107,6 +118,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax m_aSignatureValue += rChars; else if (m_bInX509Certificate) m_aX509Certificate += rChars; + else if (m_bInMdssiValue) + m_aMdssiValue += rChars; if (m_xNextHandler.is()) m_xNextHandler->characters(rChars); diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx index 54c522b57c1a..b071bca310e2 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.hxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx @@ -35,6 +35,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper OUString m_aSignatureValue; bool m_bInX509Certificate; OUString m_aX509Certificate; + bool m_bInMdssiValue; + OUString m_aMdssiValue; public: OOXMLSecParser(XSecController* pXSecController); |