crypt32: Set the info status on the last element of a chain even if its issuer can't be found.

This commit is contained in:
Juan Lang 2009-02-11 10:07:56 -08:00 committed by Alexandre Julliard
parent 913affe4ef
commit b5d1bfe5ba
2 changed files with 6 additions and 6 deletions

View File

@ -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
*/

View File

@ -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 */