Author: akhaldi
Date: Sat Sep 27 00:03:58 2014
New Revision: 64320
URL:
http://svn.reactos.org/svn/reactos?rev=64320&view=rev
Log:
[BCRYPT_WINETEST]
* Sync with Wine 1.7.27.
CORE-8540
Modified:
trunk/rostests/winetests/bcrypt/bcrypt.c
Modified: trunk/rostests/winetests/bcrypt/bcrypt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/bcrypt/bcrypt.c…
==============================================================================
--- trunk/rostests/winetests/bcrypt/bcrypt.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/bcrypt/bcrypt.c [iso-8859-1] Sat Sep 27 00:03:58 2014
@@ -27,6 +27,7 @@
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR
pbBuffer,
ULONG cbBuffer, ULONG dwFlags);
+static NTSTATUS (WINAPI *pBCryptGetFipsAlgorithmMode)(BOOLEAN *enabled);
static BOOL Init(void)
{
@@ -38,6 +39,7 @@
}
pBCryptGenRandom = (void *)GetProcAddress(hbcrypt, "BCryptGenRandom");
+ pBCryptGetFipsAlgorithmMode = (void *)GetProcAddress(hbcrypt,
"BCryptGetFipsAlgorithmMode");
return TRUE;
}
@@ -78,10 +80,29 @@
ok(memcmp(buffer, buffer + 8, 8), "Expected a random number, got 0\n");
}
+static void test_BCryptGetFipsAlgorithmMode(void)
+{
+ NTSTATUS ret;
+ BOOLEAN enabled;
+
+ if (!pBCryptGetFipsAlgorithmMode)
+ {
+ win_skip("BCryptGetFipsAlgorithmMode is not available\n");
+ return;
+ }
+
+ ret = pBCryptGetFipsAlgorithmMode(&enabled);
+ ok(ret == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%x\n", ret);
+
+ ret = pBCryptGetFipsAlgorithmMode(NULL);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got
0x%x\n", ret);
+}
+
START_TEST(bcrypt)
{
if (!Init())
return;
test_BCryptGenRandom();
+ test_BCryptGetFipsAlgorithmMode();
}