Paul Vriens : rsaenh/tests: Run tests again on Windows 95.

Alexandre Julliard julliard at winehq.org
Thu Apr 8 11:12:42 CDT 2010


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

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Wed Apr  7 22:03:17 2010 +0200

rsaenh/tests: Run tests again on Windows 95.

---

 dlls/rsaenh/tests/rsaenh.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index 5fe0033..0bc3d57 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -465,7 +465,7 @@ static void test_hashes(void)
     ok(!result && GetLastError() == NTE_BAD_ALGID,
        "expected NTE_BAD_ALGID, got %08x\n", GetLastError());
 
-    result = CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
+    result = CryptAcquireContextA(&prov, NULL, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
     ok(result, "CryptAcquireContext failed 0x%08x\n", GetLastError());
 
     result = CryptCreateHash(prov, CALG_SHA1, 0, 0, &hHash);
@@ -487,7 +487,13 @@ static void test_hashes(void)
     ok(!result, "CryptDestroyHash succeeded\n");
     ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
 
-    result = CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
+    if (!pCryptDuplicateHash)
+    {
+        win_skip("CryptDuplicateHash is not available\n");
+        return;
+    }
+
+    result = CryptAcquireContextA(&prov, NULL, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
     ok(result, "CryptAcquireContext failed 0x%08x\n", GetLastError());
 
     result = CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash);
@@ -496,7 +502,7 @@ static void test_hashes(void)
     result = CryptHashData(hHash, (const BYTE *)"data", sizeof("data"), 0);
     ok(result, "CryptHashData failed 0x%08x\n", GetLastError());
 
-    result = CryptDuplicateHash(hHash, NULL, 0, &hHashClone);
+    result = pCryptDuplicateHash(hHash, NULL, 0, &hHashClone);
     ok(result, "CryptDuplicateHash failed 0x%08x\n", GetLastError());
 
     len = 20;




More information about the wine-cvs mailing list