crypt32: Actually compare chain status instead of doing a no-op comparison, and mark as todo the statuses that don't match in Wine.

This commit is contained in:
Juan Lang 2008-10-16 14:04:27 -07:00 committed by Alexandre Julliard
parent 3454e94d94
commit e1e17b89c9
1 changed files with 29 additions and 18 deletions

View File

@ -1229,30 +1229,41 @@ typedef struct _ChainStatusCheck
static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain,
const ChainStatusCheck *chainStatus, DWORD todo, DWORD testIndex)
{
DWORD error = chainStatus->status.dwErrorStatus &
~chainStatus->statusToIgnore.dwErrorStatus;
DWORD info = chainStatus->status.dwInfoStatus &
~chainStatus->statusToIgnore.dwInfoStatus;
ok(chain->cChain == chainStatus->cChain,
"Chain %d: expected %d simple chains, got %d\n", testIndex,
chainStatus->cChain, chain->cChain);
if (todo & TODO_ERROR && error != chainStatus->status.dwErrorStatus)
todo_wine ok(error == chainStatus->status.dwErrorStatus,
if (todo & TODO_ERROR &&
chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus)
todo_wine ok(chain->TrustStatus.dwErrorStatus ==
chainStatus->status.dwErrorStatus,
"Chain %d: expected error %08x, got %08x\n",
testIndex, chainStatus->status.dwErrorStatus, error);
testIndex, chainStatus->status.dwErrorStatus,
chain->TrustStatus.dwErrorStatus);
else
ok(error == chainStatus->status.dwErrorStatus,
ok(chain->TrustStatus.dwErrorStatus ==
chainStatus->status.dwErrorStatus ||
broken((chain->TrustStatus.dwErrorStatus &
~chainStatus->statusToIgnore.dwErrorStatus) ==
chainStatus->status.dwErrorStatus),
"Chain %d: expected error %08x, got %08x\n",
testIndex, chainStatus->status.dwErrorStatus, error);
if (todo & TODO_INFO && info != chainStatus->status.dwInfoStatus)
todo_wine ok(info == chainStatus->status.dwInfoStatus,
testIndex, chainStatus->status.dwErrorStatus,
chain->TrustStatus.dwErrorStatus);
if (todo & TODO_INFO &&
chain->TrustStatus.dwInfoStatus != chainStatus->status.dwInfoStatus)
todo_wine ok(chain->TrustStatus.dwInfoStatus ==
chainStatus->status.dwInfoStatus,
"Chain %d: expected info %08x, got %08x\n",
testIndex, chainStatus->status.dwInfoStatus, info);
testIndex, chainStatus->status.dwInfoStatus,
chain->TrustStatus.dwInfoStatus);
else
ok(info == chainStatus->status.dwInfoStatus,
ok(chain->TrustStatus.dwInfoStatus ==
chainStatus->status.dwInfoStatus ||
broken((chain->TrustStatus.dwInfoStatus &
~chainStatus->statusToIgnore.dwInfoStatus) ==
chainStatus->status.dwInfoStatus),
"Chain %d: expected info %08x, got %08x\n",
testIndex, chainStatus->status.dwInfoStatus, info);
testIndex, chainStatus->status.dwInfoStatus,
chain->TrustStatus.dwInfoStatus);
if (chain->cChain == chainStatus->cChain)
{
DWORD i;
@ -1521,7 +1532,7 @@ static ChainCheck chainCheck[] = {
{ CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT |
CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 },
1, simpleStatus9 },
TODO_INFO },
TODO_ERROR | TODO_INFO },
{ { sizeof(chain10) / sizeof(chain10[0]), chain10 },
{ { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 },
@ -1530,7 +1541,7 @@ static ChainCheck chainCheck[] = {
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 },
{ { sizeof(chain12) / sizeof(chain12[0]), chain12 },
{ { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus12 }, 0 },
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus12 }, TODO_ERROR },
{ { sizeof(chain13) / sizeof(chain13[0]), chain13 },
{ { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
{ CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus13 },
@ -1566,7 +1577,7 @@ static ChainCheck chainCheckNoStore[] = {
{ CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT |
CERT_TRUST_IS_NOT_TIME_VALID, 0 },
1, simpleStatus8NoStore },
TODO_INFO },
TODO_ERROR | TODO_INFO },
};
/* Wednesday, Oct 1, 2007 */