mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Add patch for BCryptGetFipsAlgorithmMode.
This commit is contained in:
parent
d8b9dc9636
commit
96d0db4493
@ -13,10 +13,11 @@ which are not present in regular wine, and always report such issues to us
|
||||
Included bugfixes and improvements
|
||||
----------------------------------
|
||||
|
||||
**Bugfixes and features included in the next upcoming release [7]:**
|
||||
**Bugfixes and features included in the next upcoming release [8]:**
|
||||
|
||||
* Fix ITERATE_MoveFiles when no source- and destname is specified ([Wine Bug #10085](http://bugs.winehq.org/show_bug.cgi?id=10085 "Adobe Bridge CS2 complains that it can't start due to licensing restrictions (affects photoshop)"))
|
||||
* Gothic 2 demo expects an error when opening a terminating process ([Wine Bug #37087](http://bugs.winehq.org/show_bug.cgi?id=37087 "Gothic 2 english demo fails with 'Conflict: a hook process was found. Please deactivate all Antivirus and Anti-Trojan programs and debuggers.'"))
|
||||
* Multiple applications need BCryptGetFipsAlgorithmMode ([Wine Bug #32194](http://bugs.winehq.org/show_bug.cgi?id=32194 "Multiple games and applications need bcrypt.dll.BCryptGetFipsAlgorithmMode (Chess Position Trainer, Terraria, .NET System.Security.Cryptography)"))
|
||||
* Other Pipelight-specific enhancements
|
||||
* Support for DwmInvalidateIconicBitmaps ([Wine Bug #32977](http://bugs.winehq.org/show_bug.cgi?id=32977 "Solidworks 2012 needs unimplemented function dwmapi.dll.DwmInvalidateIconicBitmaps (Win7 mode)"))
|
||||
* Support for Dynamic DST (daylight saving time) information in registry
|
||||
|
@ -11,6 +11,7 @@ PATCHLIST := \
|
||||
Miscellaneous.ok \
|
||||
Pipelight.ok \
|
||||
atl-IOCS_Property.ok \
|
||||
bcrypt-BCryptGetFipsAlgorithmMode.ok \
|
||||
comctl32-LoadIconMetric.ok \
|
||||
dsound-Fast_Mixer.ok \
|
||||
dwmapi-Invalidate_Thumbnail.ok \
|
||||
@ -136,6 +137,24 @@ atl-IOCS_Property.ok:
|
||||
echo '+ { "atl-IOCS_Property", "Qian Hong", "Store IOCS data in a property instead of GWLP_USERDATA." },'; \
|
||||
) > atl-IOCS_Property.ok
|
||||
|
||||
# Patchset bcrypt-BCryptGetFipsAlgorithmMode
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Add semi-stub for BCryptGetFipsAlgorithmMode. [by Michael Müller]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#32194] Multiple applications need BCryptGetFipsAlgorithmMode
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/bcrypt/bcrypt.spec, dlls/bcrypt/bcrypt_main.c, dlls/bcrypt/tests/bcrypt.c
|
||||
# |
|
||||
.INTERMEDIATE: bcrypt-BCryptGetFipsAlgorithmMode.ok
|
||||
bcrypt-BCryptGetFipsAlgorithmMode.ok:
|
||||
$(call APPLY_FILE,bcrypt-BCryptGetFipsAlgorithmMode/0001-bcrypt-Add-semi-stub-for-BCryptGetFipsAlgorithmMode.patch)
|
||||
@( \
|
||||
echo '+ { "bcrypt-BCryptGetFipsAlgorithmMode", "Michael Müller", "Add semi-stub for BCryptGetFipsAlgorithmMode." },'; \
|
||||
) > bcrypt-BCryptGetFipsAlgorithmMode.ok
|
||||
|
||||
# Patchset comctl32-LoadIconMetric
|
||||
# |
|
||||
# | Included patches:
|
||||
|
@ -0,0 +1,98 @@
|
||||
From cdadefc52b0cdab8bc768dd6e494de69e75ae379 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(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 3b154f5..83cdbea 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -27,7 +27,7 @@
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long)
|
||||
@ stub BCryptGenerateKeyPair
|
||||
@ stub BCryptGenerateSymmetricKey
|
||||
-@ stub BCryptGetFipsAlgorithmMode
|
||||
+@ stdcall BCryptGetFipsAlgorithmMode(ptr)
|
||||
@ stub BCryptGetProperty
|
||||
@ stub BCryptHashData
|
||||
@ stub BCryptImportKey
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 5ccb9f1..b4c6fad 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -97,3 +97,14 @@ NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE algorithm, DWORD
|
||||
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
+
|
||||
+NTSTATUS WINAPI BCryptGetFipsAlgorithmMode(BOOLEAN *enabled)
|
||||
+{
|
||||
+ FIXME("%p - semi-stub\n", enabled);
|
||||
+
|
||||
+ if (!enabled)
|
||||
+ return STATUS_INVALID_PARAMETER;
|
||||
+
|
||||
+ *enabled = FALSE;
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 288e745..6e183e8 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -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 @@ static BOOL Init(void)
|
||||
}
|
||||
|
||||
pBCryptGenRandom = (void *)GetProcAddress(hbcrypt, "BCryptGenRandom");
|
||||
+ pBCryptGetFipsAlgorithmMode = (void *)GetProcAddress(hbcrypt, "BCryptGetFipsAlgorithmMode");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -78,10 +80,30 @@ static void test_BCryptGenRandom(void)
|
||||
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);
|
||||
+ 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);
|
||||
+}
|
||||
+
|
||||
START_TEST(bcrypt)
|
||||
{
|
||||
if (!Init())
|
||||
return;
|
||||
|
||||
test_BCryptGenRandom();
|
||||
+ test_BCryptGetFipsAlgorithmMode();
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
4
patches/bcrypt-BCryptGetFipsAlgorithmMode/definition
Normal file
4
patches/bcrypt-BCryptGetFipsAlgorithmMode/definition
Normal file
@ -0,0 +1,4 @@
|
||||
Author: Michael Müller
|
||||
Subject: Add semi-stub for BCryptGetFipsAlgorithmMode.
|
||||
Revision: 1
|
||||
Fixes: [32194] Multiple applications need BCryptGetFipsAlgorithmMode
|
Loading…
Reference in New Issue
Block a user