Kaydet (Commit) 51663ac5 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Fallout from previous commit 248dbe1d

Remove SignatureInformation::nSecurityEnvironmentIndex as it was
always -1.

Change-Id: I39247e5c40ce36e394c30b450626eca533f46267
üst 248dbe1d
......@@ -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;
}
};
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment