summaryrefslogtreecommitdiffstats
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-19 17:18:04 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-19 17:32:34 +0100
commit2737a187a6a7c2e04aa1c6b519a712cfb989c592 (patch)
treef088017e0e3d858c41b07f1dcf29cdd35f73f5a3 /xmlsecurity
parentxmlsecurity: handle OOXML signatures in ImplGetSignatureInformations() (diff)
downloadcore-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.cxx13
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.hxx2
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);