Juan Lang : crypt32: Fix test failures on older versions of Windows.

Alexandre Julliard julliard at winehq.org
Mon Nov 3 09:06:39 CST 2008


Module: wine
Branch: master
Commit: c83ff71293d9bfa9b0c3d81bbee8603c508e2a2d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c83ff71293d9bfa9b0c3d81bbee8603c508e2a2d

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri Oct 31 11:03:12 2008 -0700

crypt32: Fix test failures on older versions of Windows.

---

 dlls/crypt32/tests/chain.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 3d89512..34dfb6a 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -1824,15 +1824,23 @@ static void checkChainPolicyStatus(LPCSTR policy, const ChainPolicyCheck *check,
         if (ret)
         {
             if (check->todo & TODO_ERROR)
-                todo_wine ok(policyStatus.dwError == check->status.dwError,
+                todo_wine ok(policyStatus.dwError == check->status.dwError ||
+                 broken(policyStatus.dwError == CERT_TRUST_NO_ERROR),
                  "%s[%d]: expected %08x, got %08x\n",
                  HIWORD(policy) ? policy : num_to_str(LOWORD(policy)),
                  testIndex, check->status.dwError, policyStatus.dwError);
             else
-                ok(policyStatus.dwError == check->status.dwError,
+                ok(policyStatus.dwError == check->status.dwError ||
+                 broken(policyStatus.dwError == CERT_TRUST_NO_ERROR),
                  "%s[%d]: expected %08x, got %08x\n",
                  HIWORD(policy) ? policy : num_to_str(LOWORD(policy)),
                  testIndex, check->status.dwError, policyStatus.dwError);
+            if (policyStatus.dwError != check->status.dwError)
+            {
+                skip("error doesn't match, not checking indexes\n");
+                pCertFreeCertificateChain(chain);
+                return;
+            }
             if (check->todo & TODO_CHAINS)
                 todo_wine ok(policyStatus.lChainIndex ==
                  check->status.lChainIndex, "%s[%d]: expected %d, got %d\n",




More information about the wine-cvs mailing list