https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5bd2230dc854ebaf60910…
commit 5bd2230dc854ebaf60910a2b83365044e635e20f
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 17 12:33:39 2017 +0100
[CRYPT32_WINETEST] Add a PCH.
---
modules/rostests/winetests/crypt32/CMakeLists.txt | 5 +++--
modules/rostests/winetests/crypt32/base64.c | 10 ++--------
modules/rostests/winetests/crypt32/cert.c | 11 +----------
modules/rostests/winetests/crypt32/chain.c | 9 +--------
modules/rostests/winetests/crypt32/crl.c | 12 +-----------
modules/rostests/winetests/crypt32/ctl.c | 10 +---------
modules/rostests/winetests/crypt32/encode.c | 9 +--------
modules/rostests/winetests/crypt32/main.c | 10 +---------
modules/rostests/winetests/crypt32/message.c | 9 +--------
modules/rostests/winetests/crypt32/msg.c | 11 +----------
modules/rostests/winetests/crypt32/object.c | 8 +-------
modules/rostests/winetests/crypt32/oid.c | 10 +---------
modules/rostests/winetests/crypt32/precomp.h | 11 +++++++++++
modules/rostests/winetests/crypt32/protectdata.c | 9 +--------
modules/rostests/winetests/crypt32/sip.c | 10 ++--------
modules/rostests/winetests/crypt32/store.c | 10 +---------
modules/rostests/winetests/crypt32/str.c | 8 +-------
17 files changed, 31 insertions(+), 131 deletions(-)
diff --git a/modules/rostests/winetests/crypt32/CMakeLists.txt
b/modules/rostests/winetests/crypt32/CMakeLists.txt
index 6211969dd3..169694b28d 100644
--- a/modules/rostests/winetests/crypt32/CMakeLists.txt
+++ b/modules/rostests/winetests/crypt32/CMakeLists.txt
@@ -17,9 +17,10 @@ list(APPEND SOURCE
sip.c
store.c
str.c
- testlist.c)
+ precomp.h)
-add_executable(crypt32_winetest ${SOURCE})
+add_executable(crypt32_winetest ${SOURCE} testlist.c)
set_module_type(crypt32_winetest win32cui)
add_importlibs(crypt32_winetest crypt32 advapi32 user32 shlwapi shell32 msvcrt kernel32)
+add_pch(crypt32_winetest precomp.h SOURCE)
add_rostests_file(TARGET crypt32_winetest)
diff --git a/modules/rostests/winetests/crypt32/base64.c
b/modules/rostests/winetests/crypt32/base64.c
index 26ae20bead..4898d3897e 100644
--- a/modules/rostests/winetests/crypt32/base64.c
+++ b/modules/rostests/winetests/crypt32/base64.c
@@ -18,14 +18,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+
+#include "precomp.h"
#define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n"
#define ALT_CERT_HEADER "-----BEGIN This is some arbitrary text that goes
on and on-----\r\n"
diff --git a/modules/rostests/winetests/crypt32/cert.c
b/modules/rostests/winetests/crypt32/cert.c
index 28cc421cf8..8a8d36b926 100644
--- a/modules/rostests/winetests/crypt32/cert.c
+++ b/modules/rostests/winetests/crypt32/cert.c
@@ -18,16 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-//#include <winreg.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static PCCERT_CONTEXT (WINAPI
*pCertCreateSelfSignCertificate)(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE,PCERT_NAME_BLOB,DWORD,PCRYPT_KEY_PROV_INFO,PCRYPT_ALGORITHM_IDENTIFIER,PSYSTEMTIME,PSYSTEMTIME,PCERT_EXTENSIONS);
static BOOL (WINAPI *pCertGetValidUsages)(DWORD,PCCERT_CONTEXT*,int*,LPSTR*,DWORD*);
diff --git a/modules/rostests/winetests/crypt32/chain.c
b/modules/rostests/winetests/crypt32/chain.c
index 30cbaebb95..e9e8634b2b 100644
--- a/modules/rostests/winetests/crypt32/chain.c
+++ b/modules/rostests/winetests/crypt32/chain.c
@@ -18,17 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
+#include "precomp.h"
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
#include <wininet.h>
-#include <wine/test.h>
-
static const BYTE selfSignedCert[] = {
0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49,
diff --git a/modules/rostests/winetests/crypt32/crl.c
b/modules/rostests/winetests/crypt32/crl.c
index 4a15498b2b..32460e32d9 100644
--- a/modules/rostests/winetests/crypt32/crl.c
+++ b/modules/rostests/winetests/crypt32/crl.c
@@ -18,17 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-//#include <winreg.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
-
+#include "precomp.h"
static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
diff --git a/modules/rostests/winetests/crypt32/ctl.c
b/modules/rostests/winetests/crypt32/ctl.c
index 25fa03cacf..18993c0965 100644
--- a/modules/rostests/winetests/crypt32/ctl.c
+++ b/modules/rostests/winetests/crypt32/ctl.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static const BYTE emptyCTL[] = {
0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
diff --git a/modules/rostests/winetests/crypt32/encode.c
b/modules/rostests/winetests/crypt32/encode.c
index f7957a4b4f..97cedb1981 100644
--- a/modules/rostests/winetests/crypt32/encode.c
+++ b/modules/rostests/winetests/crypt32/encode.c
@@ -17,15 +17,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const
BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*);
static BOOL (WINAPI *pCryptEncodeObjectEx)(DWORD,LPCSTR,const
void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*);
diff --git a/modules/rostests/winetests/crypt32/main.c
b/modules/rostests/winetests/crypt32/main.c
index ccdab02eff..d6ef8ddeed 100644
--- a/modules/rostests/winetests/crypt32/main.c
+++ b/modules/rostests/winetests/crypt32/main.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-#include <winreg.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static HMODULE hCrypt;
diff --git a/modules/rostests/winetests/crypt32/message.c
b/modules/rostests/winetests/crypt32/message.c
index b3800dcbf6..11f3ff0cf3 100644
--- a/modules/rostests/winetests/crypt32/message.c
+++ b/modules/rostests/winetests/crypt32/message.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static BOOL (WINAPI * pCryptAcquireContextA)
(HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD);
diff --git a/modules/rostests/winetests/crypt32/msg.c
b/modules/rostests/winetests/crypt32/msg.c
index 639e427137..45a012a22c 100644
--- a/modules/rostests/winetests/crypt32/msg.c
+++ b/modules/rostests/winetests/crypt32/msg.c
@@ -18,16 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS
-#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static BOOL have_nt = TRUE;
static BOOL old_crypt32 = FALSE;
diff --git a/modules/rostests/winetests/crypt32/object.c
b/modules/rostests/winetests/crypt32/object.c
index 9ce502bc16..61e64442f5 100644
--- a/modules/rostests/winetests/crypt32/object.c
+++ b/modules/rostests/winetests/crypt32/object.c
@@ -17,14 +17,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-#include <wine/test.h>
+#include "precomp.h"
static BOOL (WINAPI * pCryptQueryObject)(DWORD, const void *, DWORD, DWORD,
DWORD, DWORD *, DWORD *, DWORD *, HCERTSTORE *, HCRYPTMSG *, const void **);
diff --git a/modules/rostests/winetests/crypt32/oid.c
b/modules/rostests/winetests/crypt32/oid.c
index 006a0477f0..9a3dbe130c 100644
--- a/modules/rostests/winetests/crypt32/oid.c
+++ b/modules/rostests/winetests/crypt32/oid.c
@@ -17,16 +17,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-#include <winreg.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INFO);
diff --git a/modules/rostests/winetests/crypt32/precomp.h
b/modules/rostests/winetests/crypt32/precomp.h
new file mode 100644
index 0000000000..1d2fc3b4e8
--- /dev/null
+++ b/modules/rostests/winetests/crypt32/precomp.h
@@ -0,0 +1,11 @@
+#ifndef _CRYPT32_WINETEST_PRECOMP_H_
+#define _CRYPT32_WINETEST_PRECOMP_H_
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <winreg.h>
+#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS
+#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS
+#include <wincrypt.h>
+
+#endif /* !_CRYPT32_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/crypt32/protectdata.c
b/modules/rostests/winetests/crypt32/protectdata.c
index dfef5456bd..3cde714cad 100644
--- a/modules/rostests/winetests/crypt32/protectdata.c
+++ b/modules/rostests/winetests/crypt32/protectdata.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
+#include "precomp.h"
static BOOL (WINAPI
*pCryptProtectData)(DATA_BLOB*,LPCWSTR,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*);
static BOOL (WINAPI
*pCryptUnprotectData)(DATA_BLOB*,LPWSTR*,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*);
diff --git a/modules/rostests/winetests/crypt32/sip.c
b/modules/rostests/winetests/crypt32/sip.c
index 0d5233d21a..512146e826 100644
--- a/modules/rostests/winetests/crypt32/sip.c
+++ b/modules/rostests/winetests/crypt32/sip.c
@@ -19,17 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
+#include "precomp.h"
+
#include <winnls.h>
-#include <wincrypt.h>
#include <mssip.h>
-#include <wine/test.h>
-
static BOOL (WINAPI * funcCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD
*,BYTE *);
static BOOL (WINAPI * funcCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD
*,DWORD,BYTE *);
static BOOL (WINAPI * funcCryptSIPCreateIndirectData)(SIP_SUBJECTINFO *,DWORD
*,SIP_INDIRECT_DATA *);
diff --git a/modules/rostests/winetests/crypt32/store.c
b/modules/rostests/winetests/crypt32/store.c
index 1ccf28dabc..226ffc04c3 100644
--- a/modules/rostests/winetests/crypt32/store.c
+++ b/modules/rostests/winetests/crypt32/store.c
@@ -18,18 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
+#include "precomp.h"
-#include <windef.h>
-#include <winbase.h>
#include <shlobj.h>
#include <shlwapi.h>
-#include <winreg.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-
-#include <wine/test.h>
/* The following aren't defined in wincrypt.h, as they're "reserved"
*/
#define CERT_CERT_PROP_ID 32
diff --git a/modules/rostests/winetests/crypt32/str.c
b/modules/rostests/winetests/crypt32/str.c
index a797ca46d5..56480859f8 100644
--- a/modules/rostests/winetests/crypt32/str.c
+++ b/modules/rostests/winetests/crypt32/str.c
@@ -17,14 +17,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdio.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include <winerror.h>
-#include <wincrypt.h>
-#include <wine/test.h>
+#include "precomp.h"
typedef struct _CertRDNAttrEncoding {
LPCSTR pszObjId;