bcrypt-BCryptGetFipsAlgorithmMode: Don't expect mode to be off (otherwise it will be difficult to get this patch upstream).

This commit is contained in:
Sebastian Lackner 2014-08-28 07:10:32 +02:00
parent e2f635a164
commit da7d2715d3

View File

@ -1,13 +1,13 @@
From cdadefc52b0cdab8bc768dd6e494de69e75ae379 Mon Sep 17 00:00:00 2001
From 7610c5da1834b6294ef7a128690eb333344bb29c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 Aug 2014 00:18:06 +0200
Subject: bcrypt: Add semi-stub for BCryptGetFipsAlgorithmMode
---
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 11 +++++++++++
dlls/bcrypt/tests/bcrypt.c | 22 ++++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 11 +++++++++++
dlls/bcrypt/tests/bcrypt.c | 21 +++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 3b154f5..83cdbea 100644
@ -43,7 +43,7 @@ index 5ccb9f1..b4c6fad 100644
+}
\ No newline at end of file
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 288e745..6e183e8 100644
index 288e745..9e659d6 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -27,6 +27,7 @@
@ -62,7 +62,7 @@ index 288e745..6e183e8 100644
return TRUE;
}
@@ -78,10 +80,30 @@ static void test_BCryptGenRandom(void)
@@ -78,10 +80,29 @@ static void test_BCryptGenRandom(void)
ok(memcmp(buffer, buffer + 8, 8), "Expected a random number, got 0\n");
}
@ -79,7 +79,6 @@ index 288e745..6e183e8 100644
+
+ ret = pBCryptGetFipsAlgorithmMode(&enabled);
+ ok(ret == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%x\n", ret);
+ ok(!enabled, "Expected FIPS mode to be disabled, but it is enabled\n");
+
+ ret = pBCryptGetFipsAlgorithmMode(NULL);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret);
@ -94,5 +93,5 @@ index 288e745..6e183e8 100644
+ test_BCryptGetFipsAlgorithmMode();
}
--
1.9.1
1.7.9.5