wintrust: Save signer cert so chain can be created.

This commit is contained in:
Juan Lang 2007-09-12 08:59:18 -07:00 committed by Alexandre Julliard
parent b13d16a0da
commit 277ef05efb
1 changed files with 10 additions and 5 deletions

View File

@ -375,17 +375,22 @@ static BOOL WINTRUST_VerifySigner(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
if (certInfo)
{
CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA para = { sizeof(para), 0, signerIdx,
CMSG_VERIFY_SIGNER_CERT, NULL };
para.pvSigner = (LPVOID)CertGetSubjectCertificateFromStore(
PCCERT_CONTEXT subject = CertGetSubjectCertificateFromStore(
data->pahStores[0], data->dwEncoding, certInfo);
if (para.pvSigner)
if (subject)
{
CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA para = { sizeof(para), 0,
signerIdx, CMSG_VERIFY_SIGNER_CERT, (LPVOID)subject };
ret = CryptMsgControl(data->hMsg, 0, CMSG_CTRL_VERIFY_SIGNATURE_EX,
&para);
if (!ret)
SetLastError(TRUST_E_CERT_SIGNATURE);
else
data->psPfns->pfnAddCert2Chain(data, signerIdx, FALSE, 0,
subject);
CertFreeCertificateContext(subject);
}
else
{