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

wintrust: In SoftpubLoadSignature, don't assume a message is present.

parent 5fa55186
......@@ -452,28 +452,34 @@ static BOOL WINTRUST_VerifySigner(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data)
{
BOOL ret;
DWORD signerCount, size;
TRACE("(%p)\n", data);
if (!data->padwTrustStepErrors)
return S_FALSE;
size = sizeof(signerCount);
ret = CryptMsgGetParam(data->hMsg, CMSG_SIGNER_COUNT_PARAM, 0,
&signerCount, &size);
if (ret)
if (data->hMsg)
{
DWORD i;
DWORD signerCount, size;
for (i = 0; ret && i < signerCount; i++)
size = sizeof(signerCount);
ret = CryptMsgGetParam(data->hMsg, CMSG_SIGNER_COUNT_PARAM, 0,
&signerCount, &size);
if (ret)
{
if ((ret = WINTRUST_SaveSigner(data, i)))
ret = WINTRUST_VerifySigner(data, i);
DWORD i;
for (i = 0; ret && i < signerCount; i++)
{
if ((ret = WINTRUST_SaveSigner(data, i)))
ret = WINTRUST_VerifySigner(data, i);
}
}
else
SetLastError(TRUST_E_NOSIGNATURE);
}
else
SetLastError(TRUST_E_NOSIGNATURE);
ret = TRUE;
if (!ret)
data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] =
GetLastError();
......
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