secur32/tests: Fix test failures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4e8d7ece69
commit
1de8e293d8
|
@ -297,7 +297,9 @@ static void test_authentication(void)
|
||||||
ok( pi->fCapabilities == NTLM_BASE_CAPS ||
|
ok( pi->fCapabilities == NTLM_BASE_CAPS ||
|
||||||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM) ||
|
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|
|
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),
|
SECPKG_FLAG_APPCONTAINER_CHECKS),
|
||||||
"got %08x\n", pi->fCapabilities );
|
"got %08x\n", pi->fCapabilities );
|
||||||
ok( pi->wVersion == 1, "got %u\n", pi->wVersion );
|
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 ||
|
ok(pi->fCapabilities == NTLM_BASE_CAPS ||
|
||||||
pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM) ||
|
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|
|
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),
|
SECPKG_FLAG_APPCONTAINER_CHECKS),
|
||||||
"got %08x\n", pi->fCapabilities);
|
"got %08x\n", pi->fCapabilities);
|
||||||
ok(pi->wVersion == 1, "got %u\n", pi->wVersion);
|
ok(pi->wVersion == 1, "got %u\n", pi->wVersion);
|
||||||
|
|
|
@ -435,11 +435,13 @@ static void testAcquireSecurityContext(void)
|
||||||
ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError());
|
ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError());
|
||||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
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);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
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);
|
"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,
|
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL,
|
||||||
|
@ -489,12 +491,13 @@ static void testAcquireSecurityContext(void)
|
||||||
schanCred.dwVersion = SCH_CRED_V3;
|
schanCred.dwVersion = SCH_CRED_V3;
|
||||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
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);
|
FreeCredentialsHandle(&cred);
|
||||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK ||
|
ok(st == SEC_E_OK || st == SEC_E_UNKNOWN_CREDENTIALS /* win2k3 */ ||
|
||||||
st == SEC_E_UNKNOWN_CREDENTIALS, /* win2k3 */
|
st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
|
||||||
"AcquireCredentialsHandleA failed: %08x\n", st);
|
"AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
FreeCredentialsHandle(&cred);
|
FreeCredentialsHandle(&cred);
|
||||||
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
||||||
|
@ -533,7 +536,7 @@ static void testAcquireSecurityContext(void)
|
||||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
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);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
/* FIXME: what about two valid certs? */
|
/* FIXME: what about two valid certs? */
|
||||||
|
|
||||||
|
@ -866,7 +869,8 @@ todo_wine
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
|
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) {
|
if(status != SEC_E_OK) {
|
||||||
skip("Handshake failed\n");
|
skip("Handshake failed\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -174,6 +174,7 @@ SECURITY_STATUS WINAPI AddSecurityPackageW(LPWSTR,SECURITY_PACKAGE_OPTIONS*);
|
||||||
#define SECPKG_FLAG_APPCONTAINER_PASSTHROUGH 0x00400000
|
#define SECPKG_FLAG_APPCONTAINER_PASSTHROUGH 0x00400000
|
||||||
#define SECPKG_FLAG_APPCONTAINER_CHECKS 0x00800000
|
#define SECPKG_FLAG_APPCONTAINER_CHECKS 0x00800000
|
||||||
#define SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED 0x01000000
|
#define SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED 0x01000000
|
||||||
|
#define SECPKG_FLAG_APPLY_LOOPBACK 0x02000000
|
||||||
|
|
||||||
#define SECPKG_ID_NONE 0xffff
|
#define SECPKG_ID_NONE 0xffff
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue