Paul Vriens : crypt32/tests: Don't crash on some win9x boxes.

Alexandre Julliard julliard at winehq.org
Mon Aug 4 08:53:34 CDT 2008


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Mon Aug  4 11:48:33 2008 +0200

crypt32/tests: Don't crash on some win9x boxes.

---

 dlls/crypt32/tests/crl.c |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/dlls/crypt32/tests/crl.c b/dlls/crypt32/tests/crl.c
index 561953b..0bd0e5c 100644
--- a/dlls/crypt32/tests/crl.c
+++ b/dlls/crypt32/tests/crl.c
@@ -161,17 +161,22 @@ static void testAddCRL(void)
     ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT),
      "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE);
 
-    /* Weird--bad add disposition leads to an access violation in Windows. */
-    ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, signedCRL,
-     sizeof(signedCRL), 0, NULL);
-    ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION ||
-                GetLastError() == E_INVALIDARG /* Vista */),
-     "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError());
-    ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL,
-     sizeof(signedCRL), 0, NULL);
-    ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION ||
-                GetLastError() == E_INVALIDARG /* Vista */),
-     "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError());
+    /* Weird--bad add disposition leads to an access violation in Windows.
+     * Both tests crash on some win9x boxes.
+     */
+    if (0)
+    {
+        ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, signedCRL,
+         sizeof(signedCRL), 0, NULL);
+        ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION ||
+                    GetLastError() == E_INVALIDARG /* Vista */),
+         "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError());
+        ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL,
+         sizeof(signedCRL), 0, NULL);
+        ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION ||
+                    GetLastError() == E_INVALIDARG /* Vista */),
+         "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError());
+    }
 
     /* Weird--can add a CRL to the NULL store (does this have special meaning?)
      */




More information about the wine-cvs mailing list