Rebase against 4981785f0fbcafbdc6a9dc4f71d06b137d558597.

This rebase is affected by the same upstream bug.
https://bugs.winehq.org/show_bug.cgi?id=50713
This commit is contained in:
Alistair Leslie-Hughes
2021-02-23 12:57:13 +11:00
parent 0d3a7a3596
commit 43a3110e95
4 changed files with 74 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
From 645cdde83d5430c5096fcb4ec4191aab7e8063ce Mon Sep 17 00:00:00 2001
From 4a511591eb74436feb8aa12e33f6caac544ba54a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 5 Jul 2019 13:20:23 +0800
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
@@ -8,19 +8,19 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
configure | 1 +
configure.ac | 1 +
dlls/cryptext/Makefile.in | 3 +-
dlls/cryptext/cryptext.spec | 4 +--
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
dlls/cryptext/tests/Makefile.in | 4 +++
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
7 files changed, 135 insertions(+), 3 deletions(-)
dlls/cryptext/cryptext.spec | 4 +-
dlls/cryptext/cryptext_main.c | 80 +++++++++++++++++++++++++++++++++
dlls/cryptext/tests/Makefile.in | 4 ++
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++
7 files changed, 151 insertions(+), 3 deletions(-)
create mode 100644 dlls/cryptext/tests/Makefile.in
create mode 100644 dlls/cryptext/tests/cryptext.c
diff --git a/configure b/configure
index 8567a9ca4ef..9b4ff8a2d7a 100755
index 08936ff0ec1..79c966d23b1 100755
--- a/configure
+++ b/configure
@@ -20276,6 +20276,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
@@ -20347,6 +20347,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
wine_fn_config_makefile dlls/cryptext enable_cryptext
@@ -29,10 +29,10 @@ index 8567a9ca4ef..9b4ff8a2d7a 100755
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
diff --git a/configure.ac b/configure.ac
index 0549a9ee78a..b58b05d4dd7 100644
index fea6fe89c83..1a10f687682 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3070,6 +3070,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
@@ -3095,6 +3095,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
WINE_CONFIG_MAKEFILE(dlls/cryptext)
@@ -41,7 +41,7 @@ index 0549a9ee78a..b58b05d4dd7 100644
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptsp)
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
index 9c9f84cee87..0e817ffda6c 100644
index 3acce60ae88..590074a806f 100644
--- a/dlls/cryptext/Makefile.in
+++ b/dlls/cryptext/Makefile.in
@@ -1,4 +1,5 @@
@@ -49,7 +49,7 @@ index 9c9f84cee87..0e817ffda6c 100644
+MODULE = cryptext.dll
+IMPORTS = crypt32 cryptui user32
EXTRADLLFLAGS = -mno-cygwin
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
index 0dba38e3934..911ab2f4ba4 100644
@@ -67,10 +67,10 @@ index 0dba38e3934..911ab2f4ba4 100644
@ stub CryptExtOpenCRLW
@ stub CryptExtOpenCTL
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
index f7c7bd1f554..2a381782d68 100644
index 537ba66cd3b..2a381782d68 100644
--- a/dlls/cryptext/cryptext_main.c
+++ b/dlls/cryptext/cryptext_main.c
@@ -22,10 +22,29 @@
@@ -22,10 +22,45 @@
#include "windef.h"
#include "winbase.h"
@@ -97,10 +97,26 @@ index f7c7bd1f554..2a381782d68 100644
+ return ret;
+}
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
@@ -59,3 +78,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
+
/***********************************************************************
* CryptExtAddPFX (CRYPTEXT.@)
*/
@@ -43,3 +78,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
FIXME("stub: %s\n", debugstr_w(filename));
return E_NOTIMPL;
}
@@ -227,5 +243,5 @@ index 00000000000..cc62a772b59
+ test_CryptExtOpenCER();
+}
--
2.20.1
2.30.0