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

wintrust: Implement GenericChainCertificateTrust.

parent cab0c5a5
......@@ -660,6 +660,58 @@ HRESULT WINAPI WintrustCertificateTrust(CRYPT_PROVIDER_DATA *data)
return ret ? S_OK : S_FALSE;
}
HRESULT WINAPI GenericChainCertificateTrust(CRYPT_PROVIDER_DATA *data)
{
BOOL ret;
WTD_GENERIC_CHAIN_POLICY_DATA *policyData =
(WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData;
TRACE("(%p)\n", data);
if (policyData && policyData->u.cbSize !=
sizeof(WTD_GENERIC_CHAIN_POLICY_CREATE_INFO))
{
SetLastError(ERROR_INVALID_PARAMETER);
ret = FALSE;
goto end;
}
if (!data->csSigners)
{
ret = FALSE;
SetLastError(TRUST_E_NOSIGNATURE);
}
else
{
DWORD i;
WTD_GENERIC_CHAIN_POLICY_CREATE_INFO createInfo, *pCreateInfo;
CERT_CHAIN_PARA chainPara, *pChainPara;
if (policyData)
{
pCreateInfo = policyData->pSignerChainInfo;
pChainPara = pCreateInfo->pChainPara;
}
else
{
WINTRUST_CreateChainPolicyCreateInfo(data, &createInfo, &chainPara);
pChainPara = &chainPara;
pCreateInfo = &createInfo;
}
ret = TRUE;
for (i = 0; i < data->csSigners; i++)
ret = WINTRUST_CreateChainForSigner(data, i, pCreateInfo,
pChainPara);
}
end:
if (!ret)
data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_CERTPROV] =
GetLastError();
TRACE("returning %d (%08x)\n", ret ? S_OK : S_FALSE,
data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_CERTPROV]);
return ret ? S_OK : S_FALSE;
}
HRESULT WINAPI SoftpubAuthenticode(CRYPT_PROVIDER_DATA *data)
{
BOOL ret;
......
......@@ -46,7 +46,7 @@
@ stub DriverFinalPolicy
@ stub DriverInitializePolicy
@ stub FindCertsByIssuer
@ stub GenericChainCertificateTrust
@ stdcall GenericChainCertificateTrust(ptr)
@ stub GenericChainFinalProv
@ stub HTTPSCertificateTrust
@ stub HTTPSFinalProv
......
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