diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-15 22:16:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-18 09:36:08 +0200 |
commit | fd1bc178b02e05cd12ec784ff87f5c97069bc5f5 (patch) | |
tree | 16c7f6c2e8e5f5d63145bbc7e000b8d115d3fe6a /xmlsecurity/source/helper/xsecparser.cxx | |
parent | tdf#42949 Fix IWYU warnings in sc/inc/f* (diff) | |
download | core-fd1bc178b02e05cd12ec784ff87f5c97069bc5f5.tar.gz core-fd1bc178b02e05cd12ec784ff87f5c97069bc5f5.zip |
tdf#109180 xmlsecurity nss: fix signing with ECDSA key
Using an ECDSA key but writing RSA URIs would fail later in libxmlsec.
Also fix up CppunitTest_xmlsecurity_signing (env vars were set too
late), so that the new testcase actually fails without the fix.
Change-Id: I9e584844d5cd046952b2f19130aeaa5a765bfc0a
Reviewed-on: https://gerrit.libreoffice.org/54400
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/helper/xsecparser.cxx')
-rw-r--r-- | xmlsecurity/source/helper/xsecparser.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx index 50c13dc95bee..2ec9c4082576 100644 --- a/xmlsecurity/source/helper/xsecparser.cxx +++ b/xmlsecurity/source/helper/xsecparser.cxx @@ -114,6 +114,13 @@ void SAL_CALL XSecParser::startElement( m_pXSecController->setId( ouIdAttr ); } } + else if (aName == "SignatureMethod") + { + OUString ouAlgorithm = xAttribs->getValueByName("Algorithm"); + if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256 + || ouAlgorithm == ALGO_ECDSASHA512) + m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA); + } else if ( aName == "Reference" ) { OUString ouUri = xAttribs->getValueByName("URI"); |