wintrust: Copy time to verify from cert info.

This commit is contained in:
Juan Lang 2007-10-03 11:54:18 -07:00 committed by Alexandre Julliard
parent 8be6c6f428
commit 85efd02fab
1 changed files with 13 additions and 1 deletions

View File

@ -276,7 +276,19 @@ HRESULT WINAPI SoftpubLoadMessage(CRYPT_PROVIDER_DATA *data)
CRYPT_PROVIDER_SGNR signer = { sizeof(signer), { 0 } }; CRYPT_PROVIDER_SGNR signer = { sizeof(signer), { 0 } };
DWORD i; DWORD i;
/* Add empty signer, so we can add a cert to it */ /* Add a signer with nothing but the time to verify, so we can
* add a cert to it
*/
if (data->pWintrustData->u.pCert->psftVerifyAsOf)
memcpy(&data->sftSystemTime, &signer.sftVerifyAsOf,
sizeof(FILETIME));
else
{
SYSTEMTIME sysTime;
GetSystemTime(&sysTime);
SystemTimeToFileTime(&sysTime, &signer.sftVerifyAsOf);
}
ret = data->psPfns->pfnAddSgnr2Chain(data, FALSE, 0, &signer); ret = data->psPfns->pfnAddSgnr2Chain(data, FALSE, 0, &signer);
if (!ret) if (!ret)
goto error; goto error;