From 00e53de76595d8064eb062e7285e6b6dc90d4bca Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 10 Oct 2013 12:53:55 +0200 Subject: [PATCH] secur32: Compile tests with __WINESRC__ define. --- dlls/secur32/tests/Makefile.in | 1 - dlls/secur32/tests/main.c | 8 ++++---- dlls/secur32/tests/negotiate.c | 10 +++++----- dlls/secur32/tests/ntlm.c | 30 +++++++++++++++--------------- dlls/secur32/tests/schannel.c | 2 +- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/dlls/secur32/tests/Makefile.in b/dlls/secur32/tests/Makefile.in index f41d50b5317..278cac4bef2 100644 --- a/dlls/secur32/tests/Makefile.in +++ b/dlls/secur32/tests/Makefile.in @@ -1,6 +1,5 @@ TESTDLL = secur32.dll IMPORTS = advapi32 ws2_32 -EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS C_SRCS = \ main.c \ diff --git a/dlls/secur32/tests/main.c b/dlls/secur32/tests/main.c index 7612b1c8958..b5b21c335bb 100644 --- a/dlls/secur32/tests/main.c +++ b/dlls/secur32/tests/main.c @@ -108,7 +108,7 @@ static const char* getSecError(SECURITY_STATUS status) /* Helper for testQuerySecurityPagageInfo */ static SECURITY_STATUS setupPackageA(SEC_CHAR *p_package_name, - PSecPkgInfo *p_pkg_info) + PSecPkgInfoA *p_pkg_info) { SECURITY_STATUS ret; @@ -121,7 +121,7 @@ static SECURITY_STATUS setupPackageA(SEC_CHAR *p_package_name, static void testInitSecurityInterface(void) { - PSecurityFunctionTable sec_fun_table = NULL; + PSecurityFunctionTableA sec_fun_table = NULL; sec_fun_table = pInitSecurityInterfaceA(); ok(sec_fun_table != NULL, "InitSecurityInterface() returned NULL.\n"); @@ -133,7 +133,7 @@ static void testEnumerateSecurityPackages(void) SECURITY_STATUS sec_status; ULONG num_packages, i; - PSecPkgInfo pkg_info = NULL; + PSecPkgInfoA pkg_info = NULL; trace("Running testEnumerateSecurityPackages\n"); @@ -197,7 +197,7 @@ static void testEnumerateSecurityPackages(void) static void testQuerySecurityPackageInfo(void) { SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info; + PSecPkgInfoA pkg_info; static SEC_CHAR ntlm[] = "NTLM", winetest[] = "Winetest"; diff --git a/dlls/secur32/tests/negotiate.c b/dlls/secur32/tests/negotiate.c index e70c1e87b89..91c3fa1e988 100644 --- a/dlls/secur32/tests/negotiate.c +++ b/dlls/secur32/tests/negotiate.c @@ -99,7 +99,7 @@ struct sspi_data CtxtHandle ctxt; PSecBufferDesc in_buf; PSecBufferDesc out_buf; - PSEC_WINNT_AUTH_IDENTITY id; + PSEC_WINNT_AUTH_IDENTITY_A id; ULONG max_token; }; @@ -256,10 +256,10 @@ static void test_authentication(void) SECURITY_STATUS status_c = SEC_I_CONTINUE_NEEDED, status_s = SEC_I_CONTINUE_NEEDED, status; struct sspi_data client, server; - SEC_WINNT_AUTH_IDENTITY id; - SecPkgContext_NegotiationInfo info; + SEC_WINNT_AUTH_IDENTITY_A id; + SecPkgContext_NegotiationInfoA info; SecPkgContext_Sizes sizes; - SecPkgInfo *pi; + SecPkgInfoA *pi; BOOL first = TRUE; id.User = (unsigned char *)"user"; @@ -357,7 +357,7 @@ done: START_TEST(negotiate) { - SecPkgInfo *info; + SecPkgInfoA *info; init_function_ptrs(); diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index 7533899eb5c..f01fa1240f9 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -67,7 +67,7 @@ typedef struct _SspiData { CtxtHandle ctxt; PSecBufferDesc in_buf; PSecBufferDesc out_buf; - PSEC_WINNT_AUTH_IDENTITY id; + PSEC_WINNT_AUTH_IDENTITY_A id; ULONG max_token; } SspiData; @@ -565,9 +565,9 @@ static void communicate(SspiData *from, SspiData *to) static void testInitializeSecurityContextFlags(void) { SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; + PSecPkgInfoA pkg_info = NULL; SspiData client; - SEC_WINNT_AUTH_IDENTITY id; + SEC_WINNT_AUTH_IDENTITY_A id; static char sec_pkg_name[] = "NTLM", test_user[] = "testuser", workgroup[] = "WORKGROUP", @@ -788,10 +788,10 @@ static void testAuth(ULONG data_rep, BOOL fake) SECURITY_STATUS client_stat = SEC_I_CONTINUE_NEEDED; SECURITY_STATUS server_stat = SEC_I_CONTINUE_NEEDED; SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; + PSecPkgInfoA pkg_info = NULL; BOOL first = TRUE; SspiData client, server; - SEC_WINNT_AUTH_IDENTITY id; + SEC_WINNT_AUTH_IDENTITY_A id; SecPkgContext_Sizes ctxt_sizes; static char sec_pkg_name[] = "NTLM", test_user[] = "testuser", @@ -921,10 +921,10 @@ static void testSignSeal(void) SECURITY_STATUS client_stat = SEC_I_CONTINUE_NEEDED; SECURITY_STATUS server_stat = SEC_I_CONTINUE_NEEDED; SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; + PSecPkgInfoA pkg_info = NULL; BOOL first = TRUE; SspiData client, server; - SEC_WINNT_AUTH_IDENTITY id; + SEC_WINNT_AUTH_IDENTITY_A id; static char sec_pkg_name[] = "NTLM"; SecBufferDesc crypt; SecBuffer data[2], fake_data[2], complex_data[4]; @@ -1004,7 +1004,7 @@ static void testSignSeal(void) fake_data[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, fake_data[0].cbBuffer); fake_data[1].BufferType = SECBUFFER_DATA; - fake_data[1].cbBuffer = lstrlen(message); + fake_data[1].cbBuffer = lstrlenA(message); fake_data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, fake_data[1].cbBuffer); sec_status = pMakeSignature(&client.ctxt, 0, &crypt, 0); @@ -1019,7 +1019,7 @@ static void testSignSeal(void) data[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[0].cbBuffer); data[1].BufferType = SECBUFFER_DATA; - data[1].cbBuffer = lstrlen(message); + data[1].cbBuffer = lstrlenA(message); data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[1].cbBuffer); memcpy(data[1].pvBuffer, message, data[1].cbBuffer); @@ -1106,7 +1106,7 @@ static void testSignSeal(void) complex_data[0].pvBuffer = message_header; complex_data[1].BufferType = SECBUFFER_DATA; - complex_data[1].cbBuffer = lstrlen(message); + complex_data[1].cbBuffer = lstrlenA(message); complex_data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[1].cbBuffer); memcpy(complex_data[1].pvBuffer, message, complex_data[1].cbBuffer); @@ -1187,8 +1187,8 @@ static BOOL testAcquireCredentialsHandle(void) test_pass[] = "testpass", sec_pkg_name[] = "NTLM"; SECURITY_STATUS ret; - SEC_WINNT_AUTH_IDENTITY id; - PSecPkgInfo pkg_info = NULL; + SEC_WINNT_AUTH_IDENTITY_A id; + PSecPkgInfoA pkg_info = NULL; if(pQuerySecurityPackageInfoA(sec_pkg_name, &pkg_info) != SEC_E_OK) { @@ -1254,8 +1254,8 @@ static void test_cred_multiple_use(void) test_pass[] = "testpass", sec_pkg_name[] = "NTLM"; SECURITY_STATUS ret; - SEC_WINNT_AUTH_IDENTITY id; - PSecPkgInfo pkg_info = NULL; + SEC_WINNT_AUTH_IDENTITY_A id; + PSecPkgInfoA pkg_info = NULL; CredHandle cred; CtxtHandle ctxt1; CtxtHandle ctxt2; @@ -1315,7 +1315,7 @@ static void test_cred_multiple_use(void) static void test_null_auth_data(void) { SECURITY_STATUS status; - PSecPkgInfo info; + PSecPkgInfoA info; CredHandle cred; CtxtHandle ctx; SecBufferDesc buffer_desc; diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index 34f2524bc98..81539c740da 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -675,7 +675,7 @@ static void test_communication(void) init_cred(&cred); cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS|SCH_CRED_MANUAL_CRED_VALIDATION; - status = pAcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, + status = pAcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); if (status != SEC_E_OK) return;