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

wintrust: Simplify error handling in SoftpubLoadSignature.

parent 47e75329
......@@ -560,7 +560,7 @@ static DWORD WINTRUST_VerifySigner(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data)
{
BOOL ret;
DWORD err;
TRACE("(%p)\n", data);
......@@ -572,30 +572,26 @@ HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data)
DWORD signerCount, size;
size = sizeof(signerCount);
ret = CryptMsgGetParam(data->hMsg, CMSG_SIGNER_COUNT_PARAM, 0,
&signerCount, &size);
if (ret)
if (CryptMsgGetParam(data->hMsg, CMSG_SIGNER_COUNT_PARAM, 0,
&signerCount, &size))
{
DWORD i;
DWORD err = ERROR_SUCCESS;
err = ERROR_SUCCESS;
for (i = 0; !err && i < signerCount; i++)
{
if (!(err = WINTRUST_SaveSigner(data, i)))
err = WINTRUST_VerifySigner(data, i);
}
if (err)
ret = FALSE;
}
else
SetLastError(TRUST_E_NOSIGNATURE);
err = TRUST_E_NOSIGNATURE;
}
else
ret = TRUE;
if (!ret)
data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_SIGPROV] =
GetLastError();
return ret ? S_OK : S_FALSE;
err = ERROR_SUCCESS;
if (err)
data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_SIGPROV] = err;
return !err ? S_OK : S_FALSE;
}
static DWORD WINTRUST_TrustStatusToConfidence(DWORD errorStatus)
......
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