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

crypt32: Check basic constraints extension for end certs too.

parent 77fe22b2
...@@ -905,6 +905,14 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine, ...@@ -905,6 +905,14 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine,
constraints.dwPathLenConstraint--; constraints.dwPathLenConstraint--;
} }
} }
else
{
/* Check whether end cert has a basic constraints extension */
if (!CRYPT_DecodeBasicConstraints(
chain->rgpElement[i]->pCertContext, &constraints, FALSE))
chain->rgpElement[i]->TrustStatus.dwErrorStatus |=
CERT_TRUST_INVALID_BASIC_CONSTRAINTS;
}
if (CRYPT_IsSimpleChainCyclic(chain)) if (CRYPT_IsSimpleChainCyclic(chain))
{ {
/* If the chain is cyclic, then the path length constraints /* If the chain is cyclic, then the path length constraints
......
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