summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source/helper/ooxmlsecparser.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-10-29 09:50:28 +0300
committerTor Lillqvist <tml@collabora.com>2016-11-08 14:31:46 +0200
commitb2318479c8635af8e022ff4f844e85a1f6b9f4de (patch)
tree35e4e7a67f8d79895e5ab321ff60c57005dba308 /xmlsecurity/source/helper/ooxmlsecparser.cxx
parenttypo fix: ressource -> resource (diff)
downloadcore-b2318479c8635af8e022ff4f844e85a1f6b9f4de.tar.gz
core-b2318479c8635af8e022ff4f844e85a1f6b9f4de.zip
Work in progress on supporting XAdES-compliant signatures for ODF
xmlsecurity is such a mess. Too many different classes that actually have more or less identical life-time, with names that smell of delusions of grandeur. "Manager", "security framework controller" etc for stuff that actually exist only during the execution of a simple dialog. And then a "helper" class that actually in on a higher level than a "framework controller". But oh well. Change-Id: I86e461b1bc91a0d8f5b7fb9f13a5be201729df1e
Diffstat (limited to 'xmlsecurity/source/helper/ooxmlsecparser.cxx')
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index cc764b69b0be..8535c8279c49 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -59,7 +59,7 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception)
{
OUString aURI = xAttribs->getValueByName("URI");
if (aURI.startsWith("#"))
- m_pXSecController->addReference(aURI.copy(1));
+ m_pXSecController->addReference(aURI.copy(1), xml::crypto::DigestID::SHA1);
else
{
m_aReferenceURI = aURI;
@@ -73,7 +73,7 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception)
OUString aAlgorithm = xAttribs->getValueByName("Algorithm");
if (aAlgorithm == ALGO_RELATIONSHIP)
{
- m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/false);
+ m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/false, /*nDigestID=*/xml::crypto::DigestID::SHA256);
m_bReferenceUnresolved = false;
}
}
@@ -132,10 +132,10 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax:
if (m_bReferenceUnresolved)
{
// No transform algorithm found, assume binary.
- m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/true);
+ m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/true, /*nDigestID=*/xml::crypto::DigestID::SHA256);
m_bReferenceUnresolved = false;
}
- m_pXSecController->setDigestValue(m_aDigestValue);
+ m_pXSecController->setDigestValue(xml::crypto::DigestID::SHA256, m_aDigestValue);
}
else if (rName == "DigestValue" && !m_bInCertDigest)
m_bInDigestValue = false;