Juan Lang : crypt32: Set the info status on the last element of a chain even if its issuer can' t be found.
Alexandre Julliard
julliard at winehq.org
Thu Feb 12 11:14:43 CST 2009
Module: wine
Branch: master
Commit: b5d1bfe5ba874006d63d456db2d5a8bf71cb07d7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5d1bfe5ba874006d63d456db2d5a8bf71cb07d7
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Feb 11 10:07:56 2009 -0800
crypt32: Set the info status on the last element of a chain even if its issuer can't be found.
---
dlls/crypt32/chain.c | 10 +++++-----
dlls/crypt32/tests/chain.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 30b1422..dce06b7 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -995,8 +995,7 @@ static PCCERT_CONTEXT CRYPT_GetIssuer(HCERTSTORE store, PCCERT_CONTEXT subject,
issuer = CertFindCertificateInStore(store,
subject->dwCertEncodingType, 0, CERT_FIND_SUBJECT_NAME,
&subject->pCertInfo->Issuer, prevIssuer);
- if (issuer)
- *infoStatus = CERT_TRUST_HAS_NAME_MATCH_ISSUER;
+ *infoStatus = CERT_TRUST_HAS_NAME_MATCH_ISSUER;
}
return issuer;
}
@@ -1013,12 +1012,13 @@ static BOOL CRYPT_BuildSimpleChain(PCertificateChainEngine engine,
while (ret && !CRYPT_IsSimpleChainCyclic(chain) &&
!CRYPT_IsCertificateSelfSigned(cert))
{
- DWORD infoStatus;
- PCCERT_CONTEXT issuer = CRYPT_GetIssuer(world, cert, NULL, &infoStatus);
+ PCCERT_CONTEXT issuer = CRYPT_GetIssuer(world, cert, NULL,
+ &chain->rgpElement[chain->cElement - 1]->TrustStatus.dwInfoStatus);
if (issuer)
{
- ret = CRYPT_AddCertToSimpleChain(engine, chain, issuer, infoStatus);
+ ret = CRYPT_AddCertToSimpleChain(engine, chain, issuer,
+ chain->rgpElement[chain->cElement - 1]->TrustStatus.dwInfoStatus);
/* CRYPT_AddCertToSimpleChain add-ref's the issuer, so free it to
* close the enumeration that found it
*/
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 6197841..9c59965 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -1620,7 +1620,7 @@ static ChainCheck chainCheckNoStore[] = {
{ { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
{ CERT_TRUST_IS_PARTIAL_CHAIN, 0 },
1, simpleStatus8NoStore },
- TODO_INFO },
+ 0 },
};
/* Wednesday, Oct 1, 2007 */
More information about the wine-cvs
mailing list