crypt32: Support hExclusiveRoot when creating a certificate chain engine.

This commit is contained in:
Juan Lang 2010-05-19 16:46:11 -07:00 committed by Alexandre Julliard
parent d3db308853
commit d298e1e614
1 changed files with 4 additions and 1 deletions

View File

@ -186,7 +186,10 @@ BOOL WINAPI CertCreateCertificateChainEngine(PCERT_CHAIN_ENGINE_CONFIG pConfig,
HCERTSTORE root;
HCERTCHAINENGINE engine;
if (pConfig->hRestrictedRoot)
if (pConfig->cbSize >= sizeof(CERT_CHAIN_ENGINE_CONFIG) &&
pConfig->hExclusiveRoot)
root = CertDuplicateStore(pConfig->hExclusiveRoot);
else if (pConfig->hRestrictedRoot)
root = CertDuplicateStore(pConfig->hRestrictedRoot);
else
root = CertOpenSystemStoreW(0, rootW);