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