[PATCH] crypt32/tests: Fix test failures on some Win95 and some NT4.

Alexander Morozov amorozov at etersoft.ru
Thu Nov 25 09:07:14 CST 2010


-------------- next part --------------
From 51be6dae55a2b7cac2838bef5a6824606a46871d Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov at etersoft.ru>
Date: Thu, 25 Nov 2010 17:38:59 +0300
Subject: [PATCH] crypt32/tests: Fix test failures on some Win95 and some NT4.

---
 dlls/crypt32/tests/message.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/dlls/crypt32/tests/message.c b/dlls/crypt32/tests/message.c
index 392ec47..69049b1 100644
--- a/dlls/crypt32/tests/message.c
+++ b/dlls/crypt32/tests/message.c
@@ -1322,10 +1322,15 @@ static void test_encrypt_message(void)
             ret = CryptEncryptMessage(&para, 0, NULL, blob, sizeof(blob),
              encryptedBlob, &encryptedBlobSize);
 	    todo_wine
-            ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
-	    todo_wine
-            ok(encryptedBlobSize == 55,
-             "unexpected size of encrypted blob %d\n", encryptedBlobSize);
+            ok(ret ||
+             broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */
+             "CryptEncryptMessage failed: %08x\n", GetLastError());
+            if (ret)
+            {
+                todo_wine
+                ok(encryptedBlobSize == 55,
+                 "unexpected size of encrypted blob %d\n", encryptedBlobSize);
+            }
             CryptMemFree(encryptedBlob);
         }
     }
@@ -1345,7 +1350,9 @@ static void test_encrypt_message(void)
             ret = CryptEncryptMessage(&para, 2, certs, blob, sizeof(blob),
              encryptedBlob, &encryptedBlobSize);
 	    todo_wine
-            ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
+            ok(ret ||
+             broken(!ret), /* some Win95 and some NT4 */
+             "CryptEncryptMessage failed: %08x\n", GetLastError());
             CryptMemFree(encryptedBlob);
         }
     }
-- 
1.7.3.2



More information about the wine-patches mailing list