From d298e1e614f1d3f48a1a21b9fca21ea217029c99 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 19 May 2010 16:46:11 -0700 Subject: [PATCH] crypt32: Support hExclusiveRoot when creating a certificate chain engine. --- dlls/crypt32/chain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index ec7f602936d..d324314e9e2 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -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);