Juan Lang : cryptnet: Fix test failures on Win2k.

Alexandre Julliard julliard at winehq.org
Thu Dec 3 10:29:50 CST 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Wed Dec  2 10:04:45 2009 -0800

cryptnet: Fix test failures on Win2k.

---

 dlls/cryptnet/tests/cryptnet.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c
index e3d9465..a66e912 100644
--- a/dlls/cryptnet/tests/cryptnet.c
+++ b/dlls/cryptnet/tests/cryptnet.c
@@ -589,9 +589,14 @@ static void test_verifyRevocation(void)
     SetLastError(0xdeadbeef);
     ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE,
      1, (void **)&certs[1], 0, &revPara, &status);
-    ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK,
+    /* Win2k thinks the cert is revoked, and it is, except the CRL is out of
+     * date, hence the revocation status should be unknown.
+     */
+    ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK ||
+     broken(GetLastError() == CRYPT_E_REVOKED /* Win2k */)),
      "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError());
-    ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK,
+    ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK ||
+     broken(status.dwError == CRYPT_E_REVOKED /* Win2k */),
      "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError);
     ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex);
     CertCloseStore(revPara.hCrlStore, 0);




More information about the wine-cvs mailing list