wintrust: Fail creating a chain if a store couldn't be created.

This commit is contained in:
Juan Lang 2010-01-27 14:14:53 -08:00 committed by Alexandre Julliard
parent 59dcf9c9ee
commit 711ca0f4f3
1 changed files with 34 additions and 28 deletions

View File

@ -771,9 +771,13 @@ static BOOL WINTRUST_CreateChainForSigner(CRYPT_PROVIDER_DATA *data,
for (i = 0; i < data->chStores; i++)
CertAddStoreToCollection(store, data->pahStores[i], 0, 0);
}
else
ret = FALSE;
}
/* Expect the end certificate for each signer to be the only cert in the
* chain:
if (ret)
{
/* Expect the end certificate for each signer to be the only cert in
* the chain:
*/
if (data->pasSigners[signer].csCertChain)
{
@ -800,7 +804,8 @@ static BOOL WINTRUST_CreateChainForSigner(CRYPT_PROVIDER_DATA *data,
ret = data->psPfns->pfnCertCheckPolicy(data, signer,
FALSE, 0);
else
TRACE("no cert check policy, skipping policy check\n");
TRACE(
"no cert check policy, skipping policy check\n");
}
else
{
@ -811,6 +816,7 @@ static BOOL WINTRUST_CreateChainForSigner(CRYPT_PROVIDER_DATA *data,
}
}
CertCloseStore(store, 0);
}
return ret;
}