mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SECUR32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
54be41be6b
commit
2b5283b702
4 changed files with 24 additions and 12 deletions
|
@ -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 );
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue