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

crypt32: Store world store in chain.

parent 818634d6
...@@ -203,6 +203,7 @@ void default_chain_engine_free(void) ...@@ -203,6 +203,7 @@ void default_chain_engine_free(void)
typedef struct _CertificateChain typedef struct _CertificateChain
{ {
CERT_CHAIN_CONTEXT context; CERT_CHAIN_CONTEXT context;
HCERTSTORE world;
LONG ref; LONG ref;
} CertificateChain, *PCertificateChain; } CertificateChain, *PCertificateChain;
...@@ -585,6 +586,7 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine, ...@@ -585,6 +586,7 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine,
if (chain) if (chain)
{ {
chain->ref = 1; chain->ref = 1;
chain->world = world;
chain->context.cbSize = sizeof(CERT_CHAIN_CONTEXT); chain->context.cbSize = sizeof(CERT_CHAIN_CONTEXT);
memcpy(&chain->context.TrustStatus, &simpleChain->TrustStatus, memcpy(&chain->context.TrustStatus, &simpleChain->TrustStatus,
sizeof(CERT_TRUST_STATUS)); sizeof(CERT_TRUST_STATUS));
...@@ -600,7 +602,6 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine, ...@@ -600,7 +602,6 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine,
ret = FALSE; ret = FALSE;
*ppChain = chain; *ppChain = chain;
} }
CertCloseStore(world, 0);
return ret; return ret;
} }
...@@ -663,6 +664,7 @@ static void CRYPT_FreeChainContext(PCertificateChain chain) ...@@ -663,6 +664,7 @@ static void CRYPT_FreeChainContext(PCertificateChain chain)
for (i = 0; i < chain->context.cChain; i++) for (i = 0; i < chain->context.cChain; i++)
CRYPT_FreeSimpleChain(chain->context.rgpChain[i]); CRYPT_FreeSimpleChain(chain->context.rgpChain[i]);
CryptMemFree(chain->context.rgpChain); CryptMemFree(chain->context.rgpChain);
CertCloseStore(chain->world, 0);
CryptMemFree(chain); CryptMemFree(chain);
} }
......
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