https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2b5283b702731c6f484c0…
commit 2b5283b702731c6f484c0175225fa36f4260039d
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Nov 30 14:48:48 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Nov 30 14:48:48 2019 +0100
[SECUR32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
---
modules/rostests/winetests/secur32/negotiate.c | 4 +++-
modules/rostests/winetests/secur32/ntlm.c | 4 +++-
modules/rostests/winetests/secur32/schannel.c | 24 +++++++++++++++---------
modules/rostests/winetests/secur32/secur32.c | 4 +++-
4 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/modules/rostests/winetests/secur32/negotiate.c
b/modules/rostests/winetests/secur32/negotiate.c
index 095aee6cb57..5e5beed7f77 100644
--- a/modules/rostests/winetests/secur32/negotiate.c
+++ b/modules/rostests/winetests/secur32/negotiate.c
@@ -297,7 +297,9 @@ static void test_authentication(void)
ok( pi->fCapabilities == NTLM_BASE_CAPS ||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM)
||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) ||
- pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPCONTAINER_CHECKS) ||
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK) ||
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK|
SECPKG_FLAG_APPCONTAINER_CHECKS),
"got %08x\n", pi->fCapabilities );
ok( pi->wVersion == 1, "got %u\n", pi->wVersion );
diff --git a/modules/rostests/winetests/secur32/ntlm.c
b/modules/rostests/winetests/secur32/ntlm.c
index 6b1249d2017..930a49e451b 100644
--- a/modules/rostests/winetests/secur32/ntlm.c
+++ b/modules/rostests/winetests/secur32/ntlm.c
@@ -929,7 +929,9 @@ static void testAuth(ULONG data_rep, BOOL fake)
ok(pi->fCapabilities == NTLM_BASE_CAPS ||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM)
||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) ||
- pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPCONTAINER_CHECKS) ||
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK) ||
+ pi->fCapabilities ==
(NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK|
SECPKG_FLAG_APPCONTAINER_CHECKS),
"got %08x\n", pi->fCapabilities);
ok(pi->wVersion == 1, "got %u\n", pi->wVersion);
diff --git a/modules/rostests/winetests/secur32/schannel.c
b/modules/rostests/winetests/secur32/schannel.c
index ebdfcb61a13..217dbe8dfaa 100644
--- a/modules/rostests/winetests/secur32/schannel.c
+++ b/modules/rostests/winetests/secur32/schannel.c
@@ -435,11 +435,13 @@ static void testAcquireSecurityContext(void)
ok(ret, "CertSetCertificateContextProperty failed: %08x\n",
GetLastError());
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
NULL, &schanCred, NULL, NULL, &cred, NULL);
- ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */,
+ ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */ ||
+ st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got
%08x\n", st);
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
NULL, &schanCred, NULL, NULL, &cred, NULL);
- ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */,
+ ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */ ||
+ st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got
%08x\n", st);
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL,
@@ -489,12 +491,13 @@ static void testAcquireSecurityContext(void)
schanCred.dwVersion = SCH_CRED_V3;
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
NULL, &schanCred, NULL, NULL, &cred, NULL);
- ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
+ ok(st == SEC_E_OK || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
+ "AcquireCredentialsHandleA failed: %08x\n", st);
FreeCredentialsHandle(&cred);
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
NULL, &schanCred, NULL, NULL, &cred, NULL);
- ok(st == SEC_E_OK ||
- st == SEC_E_UNKNOWN_CREDENTIALS, /* win2k3 */
+ ok(st == SEC_E_OK || st == SEC_E_UNKNOWN_CREDENTIALS /* win2k3 */ ||
+ st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
"AcquireCredentialsHandleA failed: %08x\n", st);
FreeCredentialsHandle(&cred);
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
@@ -533,7 +536,7 @@ static void testAcquireSecurityContext(void)
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
NULL, &schanCred, NULL, NULL, &cred, NULL);
- ok(st == SEC_E_UNKNOWN_CREDENTIALS,
+ ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS,
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
/* FIXME: what about two valid certs? */
@@ -843,7 +846,7 @@ todo_wine
buffers[1].pBuffers[0].cbBuffer = ret;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR
*)"localhost",
- ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
+ ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM|ISC_REQ_USE_SUPPLIED_CREDS,
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size;
while (status == SEC_I_CONTINUE_NEEDED)
@@ -860,17 +863,20 @@ todo_wine
buf->BufferType = SECBUFFER_TOKEN;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR
*)"localhost",
- ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
+ ISC_REQ_USE_SUPPLIED_CREDS,
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size;
}
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to
0.\n");
- ok(status == SEC_E_OK, "InitializeSecurityContext failed: %08x\n",
status);
+ ok(status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */,
+ "InitializeSecurityContext failed: %08x\n", status);
if(status != SEC_E_OK) {
skip("Handshake failed\n");
return;
}
+ ok(attrs ==
(ISC_RET_REPLAY_DETECT|ISC_RET_SEQUENCE_DETECT|ISC_RET_CONFIDENTIALITY|ISC_RET_STREAM|ISC_RET_USED_SUPPLIED_CREDS),
+ "got %08x\n", attrs);
status = QueryCredentialsAttributesA(&cred_handle, SECPKG_CRED_ATTR_NAMES,
&names);
ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before
Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", status);
diff --git a/modules/rostests/winetests/secur32/secur32.c
b/modules/rostests/winetests/secur32/secur32.c
index 2d2c2a69255..8fd421ca732 100644
--- a/modules/rostests/winetests/secur32/secur32.c
+++ b/modules/rostests/winetests/secur32/secur32.c
@@ -440,7 +440,9 @@ static void test_kerberos(void)
| SECPKG_FLAG_READONLY_WITH_CHECKSUM;
static const ULONG optional_mask =
SECPKG_FLAG_RESTRICTED_TOKENS
- | SECPKG_FLAG_APPCONTAINER_CHECKS;
+ | SECPKG_FLAG_APPCONTAINER_CHECKS
+ | 0x02000000; /* not defined in the SDK */
+
status = QuerySecurityPackageInfoA(provider, &info);
ok(status == SEC_E_OK, "Kerberos package not installed, skipping test\n");