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

crypt32: Correct another chain status discrepancy with Windows.

parent 25698f89
...@@ -754,10 +754,13 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine, ...@@ -754,10 +754,13 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine,
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
* are violated, because the chain is infinitely long. * are violated, because the chain is infinitely long. MS
* misleadingly also sets the not supported name constraint bit,
* whether or not name constraints were present.
*/ */
pathLengthConstraintViolated = TRUE; pathLengthConstraintViolated = TRUE;
chain->TrustStatus.dwErrorStatus |= chain->TrustStatus.dwErrorStatus |=
CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT |
CERT_TRUST_INVALID_BASIC_CONSTRAINTS; CERT_TRUST_INVALID_BASIC_CONSTRAINTS;
} }
/* FIXME: check valid usages */ /* FIXME: check valid usages */
......
...@@ -1530,7 +1530,7 @@ static ChainCheck chainCheck[] = { ...@@ -1530,7 +1530,7 @@ static ChainCheck chainCheck[] = {
{ CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT | { CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT |
CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 }, CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 },
1, simpleStatus9 }, 1, simpleStatus9 },
TODO_ERROR | TODO_INFO }, TODO_INFO },
{ { sizeof(chain10) / sizeof(chain10[0]), chain10 }, { { sizeof(chain10) / sizeof(chain10[0]), chain10 },
{ { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 }, { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 },
......
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