From 765413ebd8c5501880f014c6e0738ffba7816f36 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 31 Jul 2008 11:20:25 -0700 Subject: [PATCH] crypt32: Fix some test failures on Win9x. --- dlls/crypt32/tests/chain.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c index 91cae474429..5bae989367a 100644 --- a/dlls/crypt32/tests/chain.c +++ b/dlls/crypt32/tests/chain.c @@ -1741,6 +1741,14 @@ static ChainPolicyCheck basicConstraintsPolicyCheck[] = { { 0, 0, -1, -1, NULL }, 0 }, }; +static const char *num_to_str(WORD num) +{ + static char buf[6]; + + sprintf(buf, "#%04X", num); + return buf; +} + static void checkChainPolicyStatus(LPCSTR policy, ChainPolicyCheck *check, DWORD testIndex) { @@ -1757,8 +1765,17 @@ static void checkChainPolicyStatus(LPCSTR policy, ChainPolicyCheck *check, todo_wine ok(ret, "%d: CertVerifyCertificateChainPolicy failed: %08x\n", testIndex, GetLastError()); else + { + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("%d: missing policy %s, skipping test\n", testIndex, + HIWORD(policy) ? policy : num_to_str(LOWORD(policy))); + pCertFreeCertificateChain(chain); + return; + } ok(ret, "%d: CertVerifyCertificateChainPolicy failed: %08x\n", testIndex, GetLastError()); + } if (ret) { if (check->todo & TODO_ERROR)