diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-11-08 15:46:30 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-11-08 15:46:30 +0200 |
commit | 51663ac544b5ac2a20e21909c6fc6b1b6447fafd (patch) | |
tree | b6d2227bcbfb2f6ed121234f4d534d05a3528562 /xmlsecurity | |
parent | 248dbe1de5eeea9e9173e53a0b1891f63ff73d68 (diff) |
Fallout from previous commit 248dbe1de5eeea9e9173e53a0b1891f63ff73d68
Remove SignatureInformation::nSecurityEnvironmentIndex as it was
always -1.
Change-Id: I39247e5c40ce36e394c30b450626eca533f46267
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/inc/sigstruct.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/xmlsecurity/inc/sigstruct.hxx b/xmlsecurity/inc/sigstruct.hxx index e662d36cb4a8..1b6cdb86fa99 100644 --- a/xmlsecurity/inc/sigstruct.hxx +++ b/xmlsecurity/inc/sigstruct.hxx @@ -68,7 +68,6 @@ typedef ::std::vector< SignatureReferenceInformation > SignatureReferenceInforma struct SignatureInformation { sal_Int32 nSecurityId; - sal_Int32 nSecurityEnvironmentIndex; css::xml::crypto::SecurityOperationStatus nStatus; // For ODF: XAdES digests (SHA256) or the old SHA1, from css::xml::crypto::DigestID sal_Int32 nDigestID; @@ -106,7 +105,6 @@ struct SignatureInformation { nSecurityId = nId; nStatus = css::xml::crypto::SecurityOperationStatus_UNKNOWN; - nSecurityEnvironmentIndex = -1; } }; diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index 8e4c5d9b6103..a994174548c1 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -90,15 +90,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar args[2] = cssu::makeAny(OUString::number(nIdOfSignatureElementCollector)); //for nss, the internal module is used for signing, which needs to be improved later - sal_Int32 nEnvIndex = internalSignatureInfor.signatureInfor.nSecurityEnvironmentIndex; - if( nEnvIndex < 0 || nEnvIndex >= m_xSecurityContext->getSecurityEnvironmentNumber()) - {// set defaultEnv - args[3] = cssu::makeAny(m_xSecurityContext->getSecurityEnvironment()); - } - else - { - args[3] = cssu::makeAny(m_xSecurityContext->getSecurityEnvironmentByIndex(nEnvIndex)); - } + args[3] = cssu::makeAny(m_xSecurityContext->getSecurityEnvironment()); args[4] = cssu::makeAny(m_xXMLSignature); xInitialization->initialize(args); @@ -239,7 +231,6 @@ void XSecController::setX509Certificate( if ( index == -1 ) { InternalSignatureInformation isi(nSecurityId, nullptr); - isi.signatureInfor.nSecurityEnvironmentIndex = -1; isi.signatureInfor.ouX509IssuerName = ouX509IssuerName; isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber; isi.signatureInfor.ouX509Certificate = ouX509Cert; @@ -254,7 +245,6 @@ void XSecController::setX509Certificate( si.ouX509SerialNumber = ouX509SerialNumber; si.ouX509Certificate = ouX509Cert; si.ouCertDigest = ouX509CertDigest; - si.nSecurityEnvironmentIndex = -1; } } |