wintrust: Save signer cert so chain can be created.
This commit is contained in:
parent
b13d16a0da
commit
277ef05efb
|
@ -375,17 +375,22 @@ static BOOL WINTRUST_VerifySigner(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
|
||||||
|
|
||||||
if (certInfo)
|
if (certInfo)
|
||||||
{
|
{
|
||||||
CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA para = { sizeof(para), 0, signerIdx,
|
PCCERT_CONTEXT subject = CertGetSubjectCertificateFromStore(
|
||||||
CMSG_VERIFY_SIGNER_CERT, NULL };
|
|
||||||
|
|
||||||
para.pvSigner = (LPVOID)CertGetSubjectCertificateFromStore(
|
|
||||||
data->pahStores[0], data->dwEncoding, certInfo);
|
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,
|
ret = CryptMsgControl(data->hMsg, 0, CMSG_CTRL_VERIFY_SIGNATURE_EX,
|
||||||
¶);
|
¶);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
SetLastError(TRUST_E_CERT_SIGNATURE);
|
SetLastError(TRUST_E_CERT_SIGNATURE);
|
||||||
|
else
|
||||||
|
data->psPfns->pfnAddCert2Chain(data, signerIdx, FALSE, 0,
|
||||||
|
subject);
|
||||||
|
CertFreeCertificateContext(subject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue