Commit cdfb393d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wintrust: Only set the error on the root element of the chain.

parent c20a617a
......@@ -611,9 +611,6 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
data->pasSigners[signerIdx].pasCertChain[0].dwConfidence =
WINTRUST_TrustStatusToConfidence(
simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus);
data->pasSigners[signerIdx].pasCertChain[0].dwError =
WINTRUST_TrustStatusToError(
simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus);
data->pasSigners[signerIdx].pasCertChain[0].pChainElement =
simpleChain->rgpElement[0];
ret = TRUE;
......@@ -628,11 +625,12 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
data->pasSigners[signerIdx].pasCertChain[i].dwConfidence =
WINTRUST_TrustStatusToConfidence(
simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus);
data->pasSigners[signerIdx].pasCertChain[i].dwError =
WINTRUST_TrustStatusToError(
simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus);
}
}
data->pasSigners[signerIdx].pasCertChain[simpleChain->cElement - 1].dwError
= WINTRUST_TrustStatusToError(
simpleChain->rgpElement[simpleChain->cElement - 1]->
TrustStatus.dwErrorStatus);
return ret;
}
......
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