Juan Lang : crypt32: Fix some test failures on Win9x.

Alexandre Julliard julliard at winehq.org
Fri Aug 1 05:33:50 CDT 2008


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jul 31 11:20:25 2008 -0700

crypt32: Fix some test failures on Win9x.

---

 dlls/crypt32/tests/chain.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 91cae47..5bae989 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)




More information about the wine-cvs mailing list