secur32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ff63f8165a
commit
a92db992c9
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
TESTDLL = secur32.dll
|
||||
IMPORTS = secur32 crypt32 advapi32 ws2_32
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static const char* getSecError(SECURITY_STATUS status)
|
|||
_SEC_ERR(SEC_E_NO_CREDENTIALS);
|
||||
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
||||
default:
|
||||
sprintf(buf, "%08x\n", status);
|
||||
sprintf(buf, "%08lx\n", status);
|
||||
return buf;
|
||||
}
|
||||
#undef _SEC_ERR
|
||||
|
@ -140,27 +140,27 @@ static void testEnumerateSecurityPackages(void)
|
|||
sec_status = pEnumerateSecurityPackagesA(&num_packages, &pkg_info);
|
||||
|
||||
ok(sec_status == SEC_E_OK,
|
||||
"EnumerateSecurityPackages() should return %d, not %08x\n",
|
||||
"EnumerateSecurityPackages() should return %ld, not %08lx\n",
|
||||
SEC_E_OK, sec_status);
|
||||
|
||||
if (num_packages == 0)
|
||||
{
|
||||
todo_wine
|
||||
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n",
|
||||
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %ld\n",
|
||||
num_packages);
|
||||
skip("no sec packages to check\n");
|
||||
return;
|
||||
}
|
||||
else
|
||||
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n",
|
||||
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %ld\n",
|
||||
num_packages);
|
||||
|
||||
ok(pkg_info != NULL,
|
||||
"pkg_info should not be NULL after EnumerateSecurityPackages\n");
|
||||
|
||||
trace("Number of packages: %d\n", num_packages);
|
||||
trace("Number of packages: %ld\n", num_packages);
|
||||
for(i = 0; i < num_packages; ++i){
|
||||
trace("%d: Package \"%s\"\n", i, pkg_info[i].Name);
|
||||
trace("%ld: Package \"%s\"\n", i, pkg_info[i].Name);
|
||||
trace("Supported flags:\n");
|
||||
#define X(flag) \
|
||||
if(pkg_info[i].fCapabilities & flag) \
|
||||
|
|
|
@ -120,14 +120,14 @@ static SECURITY_STATUS setup_client( struct sspi_data *data, SEC_CHAR *provider
|
|||
trace( "setting up client\n" );
|
||||
|
||||
ret = QuerySecurityPackageInfoA( provider, &info );
|
||||
ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08x\n", ret );
|
||||
ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08lx\n", ret );
|
||||
|
||||
setup_buffers( data, info );
|
||||
FreeContextBuffer( info );
|
||||
|
||||
ret = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL,
|
||||
data->id, NULL, NULL, &data->cred, &ttl );
|
||||
ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", ret );
|
||||
ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", ret );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -140,14 +140,14 @@ static SECURITY_STATUS setup_server( struct sspi_data *data, SEC_CHAR *provider
|
|||
trace( "setting up server\n" );
|
||||
|
||||
ret = QuerySecurityPackageInfoA( provider, &info );
|
||||
ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08x\n", ret );
|
||||
ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08lx\n", ret );
|
||||
|
||||
setup_buffers( data, info );
|
||||
FreeContextBuffer( info );
|
||||
|
||||
ret = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_INBOUND, NULL,
|
||||
NULL, NULL, NULL, &data->cred, &ttl );
|
||||
ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", ret );
|
||||
ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", ret );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ static SECURITY_STATUS run_client( struct sspi_data *data, BOOL first )
|
|||
ret = SEC_E_OK;
|
||||
}
|
||||
ok( data->out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN,
|
||||
"buffer type changed from SECBUFFER_TOKEN to %u\n", data->out_buf->pBuffers[0].BufferType );
|
||||
"buffer type changed from SECBUFFER_TOKEN to %lu\n", data->out_buf->pBuffers[0].BufferType );
|
||||
ok( data->out_buf->pBuffers[0].cbBuffer < data->max_token,
|
||||
"InitializeSecurityContext didn't change buffer size\n" );
|
||||
return ret;
|
||||
|
@ -237,12 +237,12 @@ static void test_authentication(void)
|
|||
client.id = &id;
|
||||
if ((status = setup_client( &client, (SEC_CHAR *)"Negotiate" )))
|
||||
{
|
||||
skip( "setup_client returned %08x, skipping test\n", status );
|
||||
skip( "setup_client returned %08lx, skipping test\n", status );
|
||||
return;
|
||||
}
|
||||
if ((status = setup_server( &server, (SEC_CHAR *)"Negotiate" )))
|
||||
{
|
||||
skip( "setup_server returned %08x, skipping test\n", status );
|
||||
skip( "setup_server returned %08lx, skipping test\n", status );
|
||||
FreeCredentialsHandle( &client.cred );
|
||||
return;
|
||||
}
|
||||
|
@ -251,14 +251,14 @@ static void test_authentication(void)
|
|||
{
|
||||
status_c = run_client( &client, first );
|
||||
ok( status_c == SEC_E_OK || status_c == SEC_I_CONTINUE_NEEDED,
|
||||
"client returned %08x, more tests will fail\n", status_c );
|
||||
"client returned %08lx, more tests will fail\n", status_c );
|
||||
|
||||
communicate( &client, &server );
|
||||
|
||||
status_s = run_server( &server, first );
|
||||
ok( status_s == SEC_E_OK || status_s == SEC_I_CONTINUE_NEEDED ||
|
||||
status_s == SEC_E_LOGON_DENIED,
|
||||
"server returned %08x, more tests will fail\n", status_s );
|
||||
"server returned %08lx, more tests will fail\n", status_s );
|
||||
|
||||
communicate( &server, &client );
|
||||
trace( "looping\n");
|
||||
|
@ -275,19 +275,19 @@ static void test_authentication(void)
|
|||
sizes.cbSecurityTrailer = 0xdeadbeef;
|
||||
sizes.cbBlockSize = 0xdeadbeef;
|
||||
status_c = QueryContextAttributesA( &client.ctxt, SECPKG_ATTR_SIZES, &sizes );
|
||||
ok( status_c == SEC_E_OK, "pQueryContextAttributesA returned %08x\n", status_c );
|
||||
ok( status_c == SEC_E_OK, "pQueryContextAttributesA returned %08lx\n", status_c );
|
||||
ok( sizes.cbMaxToken == 2888 || sizes.cbMaxToken == 1904,
|
||||
"expected 2888 or 1904, got %u\n", sizes.cbMaxToken );
|
||||
ok( sizes.cbMaxSignature == 16, "expected 16, got %u\n", sizes.cbMaxSignature );
|
||||
ok( sizes.cbSecurityTrailer == 16, "expected 16, got %u\n", sizes.cbSecurityTrailer );
|
||||
ok( !sizes.cbBlockSize, "expected 0, got %u\n", sizes.cbBlockSize );
|
||||
"expected 2888 or 1904, got %lu\n", sizes.cbMaxToken );
|
||||
ok( sizes.cbMaxSignature == 16, "expected 16, got %lu\n", sizes.cbMaxSignature );
|
||||
ok( sizes.cbSecurityTrailer == 16, "expected 16, got %lu\n", sizes.cbSecurityTrailer );
|
||||
ok( !sizes.cbBlockSize, "expected 0, got %lu\n", sizes.cbBlockSize );
|
||||
|
||||
memset( &info, 0, sizeof(info) );
|
||||
status_c = QueryContextAttributesA( &client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info );
|
||||
ok( status_c == SEC_E_OK, "QueryContextAttributesA returned %08x\n", status_c );
|
||||
ok( status_c == SEC_E_OK, "QueryContextAttributesA returned %08lx\n", status_c );
|
||||
|
||||
pi = info.PackageInfo;
|
||||
ok( info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState );
|
||||
ok( info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %lu\n", info.NegotiationState );
|
||||
ok( pi != NULL, "expected non-NULL PackageInfo\n" );
|
||||
if (pi)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ static void test_authentication(void)
|
|||
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 );
|
||||
"got %08lx\n", pi->fCapabilities );
|
||||
ok( pi->wVersion == 1, "got %u\n", pi->wVersion );
|
||||
ok( pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID );
|
||||
ok( !lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name );
|
||||
|
@ -314,7 +314,7 @@ static void test_authentication(void)
|
|||
ok( pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n" );
|
||||
|
||||
status = FreeContextBuffer( pi );
|
||||
ok( status == SEC_E_OK, "FreeContextBuffer error %#x\n", status );
|
||||
ok( status == SEC_E_OK, "FreeContextBuffer error %#lx\n", status );
|
||||
}
|
||||
|
||||
done:
|
||||
|
@ -324,25 +324,25 @@ done:
|
|||
if (client.ctxt.dwLower || client.ctxt.dwUpper)
|
||||
{
|
||||
status_c = DeleteSecurityContext( &client.ctxt );
|
||||
ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_c );
|
||||
ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08lx\n", status_c );
|
||||
}
|
||||
|
||||
if (server.ctxt.dwLower || server.ctxt.dwUpper)
|
||||
{
|
||||
status_s = DeleteSecurityContext( &server.ctxt );
|
||||
ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_s );
|
||||
ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08lx\n", status_s );
|
||||
}
|
||||
|
||||
if (client.cred.dwLower || client.cred.dwUpper)
|
||||
{
|
||||
status_c = FreeCredentialsHandle( &client.cred );
|
||||
ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_c );
|
||||
ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08lx\n", status_c );
|
||||
}
|
||||
|
||||
if (server.cred.dwLower || server.cred.dwUpper)
|
||||
{
|
||||
status_s = FreeCredentialsHandle(&server.cred);
|
||||
ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_s );
|
||||
ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08lx\n", status_s );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ START_TEST(negotiate)
|
|||
info->fCapabilities == (NEGOTIATE_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) ||
|
||||
info->fCapabilities == (NEGOTIATE_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|
|
||||
SECPKG_FLAG_APPCONTAINER_CHECKS),
|
||||
"got %08x\n", info->fCapabilities );
|
||||
"got %08lx\n", info->fCapabilities );
|
||||
ok( info->wVersion == 1, "got %u\n", info->wVersion );
|
||||
ok( info->wRPCID == RPC_C_AUTHN_GSS_NEGOTIATE, "got %u\n", info->wRPCID );
|
||||
ok( !lstrcmpA( info->Name, "Negotiate" ), "got %s\n", info->Name );
|
||||
|
|
|
@ -233,7 +233,7 @@ static const char* getSecError(SECURITY_STATUS status)
|
|||
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
||||
_SEC_ERR(SEC_E_MESSAGE_ALTERED);
|
||||
default:
|
||||
sprintf(buf, "%08x\n", status);
|
||||
sprintf(buf, "%08lx\n", status);
|
||||
return buf;
|
||||
}
|
||||
#undef _SEC_ERR
|
||||
|
@ -476,7 +476,7 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep
|
|||
ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret));
|
||||
|
||||
ok(out_buf->pBuffers[0].cbBuffer == 0,
|
||||
"InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer);
|
||||
"InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer);
|
||||
|
||||
out_buf->pBuffers[0].cbBuffer = sspi_data->max_token;
|
||||
out_buf->pBuffers[0].BufferType = SECBUFFER_DATA;
|
||||
|
@ -505,9 +505,9 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep
|
|||
}
|
||||
|
||||
ok(out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN,
|
||||
"buffer type was changed from SECBUFFER_TOKEN to %d\n", out_buf->pBuffers[0].BufferType);
|
||||
"buffer type was changed from SECBUFFER_TOKEN to %ld\n", out_buf->pBuffers[0].BufferType);
|
||||
ok(out_buf->pBuffers[0].cbBuffer < sspi_data->max_token,
|
||||
"InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer);
|
||||
"InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -902,24 +902,24 @@ static void testAuth(ULONG data_rep, BOOL fake)
|
|||
"pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s\n",
|
||||
getSecError(sec_status));
|
||||
ok((ctxt_sizes.cbMaxToken == 1904) || (ctxt_sizes.cbMaxToken == 2888),
|
||||
"cbMaxToken should be 1904 or 2888 but is %u\n",
|
||||
"cbMaxToken should be 1904 or 2888 but is %lu\n",
|
||||
ctxt_sizes.cbMaxToken);
|
||||
ok(ctxt_sizes.cbMaxSignature == 16,
|
||||
"cbMaxSignature should be 16 but is %u\n",
|
||||
"cbMaxSignature should be 16 but is %lu\n",
|
||||
ctxt_sizes.cbMaxSignature);
|
||||
ok(ctxt_sizes.cbSecurityTrailer == 16,
|
||||
"cbSecurityTrailer should be 16 but is %u\n",
|
||||
"cbSecurityTrailer should be 16 but is %lu\n",
|
||||
ctxt_sizes.cbSecurityTrailer);
|
||||
ok(ctxt_sizes.cbBlockSize == 0,
|
||||
"cbBlockSize should be 0 but is %u\n",
|
||||
"cbBlockSize should be 0 but is %lu\n",
|
||||
ctxt_sizes.cbBlockSize);
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
sec_status = QueryContextAttributesA(&client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info);
|
||||
ok(sec_status == SEC_E_OK, "QueryContextAttributesA returned %08x\n", sec_status);
|
||||
ok(sec_status == SEC_E_OK, "QueryContextAttributesA returned %08lx\n", sec_status);
|
||||
|
||||
pi = info.PackageInfo;
|
||||
ok(info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState);
|
||||
ok(info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %lu\n", info.NegotiationState);
|
||||
ok(pi != NULL, "expected non-NULL PackageInfo\n");
|
||||
if (pi)
|
||||
{
|
||||
|
@ -933,7 +933,7 @@ static void testAuth(ULONG data_rep, BOOL fake)
|
|||
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);
|
||||
"got %08lx\n", pi->fCapabilities);
|
||||
ok(pi->wVersion == 1, "got %u\n", pi->wVersion);
|
||||
ok(pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID);
|
||||
ok(!lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name);
|
||||
|
@ -946,7 +946,7 @@ static void testAuth(ULONG data_rep, BOOL fake)
|
|||
ok(pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n");
|
||||
|
||||
sec_status = FreeContextBuffer(pi);
|
||||
ok(sec_status == SEC_E_OK, "FreeContextBuffer error %#x\n", sec_status);
|
||||
ok(sec_status == SEC_E_OK, "FreeContextBuffer error %#lx\n", sec_status);
|
||||
}
|
||||
|
||||
tAuthend:
|
||||
|
@ -1108,13 +1108,13 @@ static void testSignSeal(void)
|
|||
ok(sec_status == SEC_E_MESSAGE_ALTERED,
|
||||
"VerifySignature returned %s, not SEC_E_MESSAGE_ALTERED.\n",
|
||||
getSecError(sec_status));
|
||||
ok(qop == 0xdeadbeef, "qop changed to %u\n", qop);
|
||||
ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
|
||||
|
||||
memcpy(data[0].pvBuffer, message_signature, data[0].cbBuffer);
|
||||
sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop);
|
||||
ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK.\n",
|
||||
getSecError(sec_status));
|
||||
ok(qop == 0xdeadbeef, "qop changed to %u\n", qop);
|
||||
ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
|
||||
|
||||
sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0);
|
||||
if (sec_status == SEC_E_UNSUPPORTED_FUNCTION)
|
||||
|
@ -1161,7 +1161,7 @@ static void testSignSeal(void)
|
|||
ok(!memcmp(crypt.pBuffers[1].pvBuffer, message_binary,
|
||||
crypt.pBuffers[1].cbBuffer),
|
||||
"Failed to decrypt message correctly.\n");
|
||||
ok(qop == 0xdeadbeef, "qop changed to %u\n", qop);
|
||||
ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
|
||||
}
|
||||
else trace( "A different session key is being used\n" );
|
||||
|
||||
|
@ -1199,7 +1199,7 @@ static void testSignSeal(void)
|
|||
sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop);
|
||||
ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK\n",
|
||||
getSecError(sec_status));
|
||||
ok(qop == 0xdeadbeef, "qop changed to %u\n", qop);
|
||||
ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
|
||||
|
||||
sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0);
|
||||
ok(sec_status == SEC_E_OK, "EncryptMessage returned %s, not SEC_E_OK.\n",
|
||||
|
@ -1231,7 +1231,7 @@ static void testSignSeal(void)
|
|||
sec_status = pDecryptMessage(&client.ctxt, &crypt, 0, &qop);
|
||||
ok(sec_status == SEC_E_OK, "DecryptMessage returned %s, not SEC_E_OK.\n",
|
||||
getSecError(sec_status));
|
||||
ok(qop == 0xdeadbeef, "qop changed to %u\n", qop);
|
||||
ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
|
||||
|
||||
|
||||
end:
|
||||
|
@ -1444,19 +1444,19 @@ static void test_cred_multiple_use(void)
|
|||
ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION,
|
||||
0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt1, &buffer_desc,
|
||||
&ctxt_attr, &ttl);
|
||||
ok(ret == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed with error 0x%x\n", ret);
|
||||
ok(ret == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed with error 0x%lx\n", ret);
|
||||
|
||||
ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION,
|
||||
0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt2, &buffer_desc,
|
||||
&ctxt_attr, &ttl);
|
||||
ok(ret == SEC_I_CONTINUE_NEEDED, "Second InitializeSecurityContextA on cred handle failed with error 0x%x\n", ret);
|
||||
ok(ret == SEC_I_CONTINUE_NEEDED, "Second InitializeSecurityContextA on cred handle failed with error 0x%lx\n", ret);
|
||||
|
||||
ret = pDeleteSecurityContext(&ctxt1);
|
||||
ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret);
|
||||
ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%lx\n", ret);
|
||||
ret = pDeleteSecurityContext(&ctxt2);
|
||||
ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret);
|
||||
ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%lx\n", ret);
|
||||
ret = pFreeCredentialsHandle(&cred);
|
||||
ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%x\n", ret);
|
||||
ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%lx\n", ret);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, buffers[0].pvBuffer);
|
||||
}
|
||||
|
@ -1494,7 +1494,7 @@ static void test_null_auth_data(void)
|
|||
|
||||
size = sizeof(user);
|
||||
ret = pGetUserNameExA(NameSamCompatible, user, &size);
|
||||
ok(ret, "GetUserNameExA failed %u\n", GetLastError());
|
||||
ok(ret, "GetUserNameExA failed %lu\n", GetLastError());
|
||||
|
||||
status = pInitializeSecurityContextA(&cred, NULL, (SEC_CHAR *)user,
|
||||
ISC_REQ_CONNECTION, 0, SECURITY_NETWORK_DREP,
|
||||
|
|
|
@ -177,10 +177,10 @@ static void test_strength(PCredHandle handle)
|
|||
SECURITY_STATUS st;
|
||||
|
||||
st = QueryCredentialsAttributesA(handle, SECPKG_ATTR_CIPHER_STRENGTHS, &strength);
|
||||
ok(st == SEC_E_OK, "QueryCredentialsAttributesA failed: %u\n", GetLastError());
|
||||
ok(st == SEC_E_OK, "QueryCredentialsAttributesA failed: %lu\n", GetLastError());
|
||||
ok(strength.dwMinimumCipherStrength, "dwMinimumCipherStrength not changed\n");
|
||||
ok(strength.dwMaximumCipherStrength, "dwMaximumCipherStrength not changed\n");
|
||||
trace("strength %d - %d\n", strength.dwMinimumCipherStrength, strength.dwMaximumCipherStrength);
|
||||
trace("strength %ld - %ld\n", strength.dwMinimumCipherStrength, strength.dwMaximumCipherStrength);
|
||||
}
|
||||
|
||||
static void test_supported_protocols(CredHandle *handle, unsigned exprots)
|
||||
|
@ -189,10 +189,10 @@ static void test_supported_protocols(CredHandle *handle, unsigned exprots)
|
|||
SECURITY_STATUS status;
|
||||
|
||||
status = QueryCredentialsAttributesA(handle, SECPKG_ATTR_SUPPORTED_PROTOCOLS, &protocols);
|
||||
ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08lx\n", status);
|
||||
|
||||
if(exprots)
|
||||
ok(protocols.grbitProtocol == exprots, "protocols.grbitProtocol = %x, expected %x\n", protocols.grbitProtocol, exprots);
|
||||
ok(protocols.grbitProtocol == exprots, "protocols.grbitProtocol = %lx, expected %x\n", protocols.grbitProtocol, exprots);
|
||||
|
||||
trace("Supported protocols:\n");
|
||||
|
||||
|
@ -208,7 +208,7 @@ static void test_supported_protocols(CredHandle *handle, unsigned exprots)
|
|||
#undef X
|
||||
|
||||
if(protocols.grbitProtocol)
|
||||
trace("Unknown flags: %x\n", protocols.grbitProtocol);
|
||||
trace("Unknown flags: %lx\n", protocols.grbitProtocol);
|
||||
}
|
||||
|
||||
static void test_supported_algs(CredHandle *handle)
|
||||
|
@ -218,11 +218,11 @@ static void test_supported_algs(CredHandle *handle)
|
|||
unsigned i;
|
||||
|
||||
status = QueryCredentialsAttributesA(handle, SECPKG_ATTR_SUPPORTED_ALGS, &algs);
|
||||
todo_wine ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08x\n", status);
|
||||
todo_wine ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08lx\n", status);
|
||||
if(status != SEC_E_OK)
|
||||
return;
|
||||
|
||||
trace("Supported algorithms (%d):\n", algs.cSupportedAlgs);
|
||||
trace("Supported algorithms (%ld):\n", algs.cSupportedAlgs);
|
||||
for(i=0; i < algs.cSupportedAlgs; i++)
|
||||
trace(" %s\n", algid_to_str(algs.palgSupportedAlgs[i]));
|
||||
|
||||
|
@ -237,16 +237,16 @@ static void test_cread_attrs(void)
|
|||
|
||||
status = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, NULL, NULL, NULL, &cred, NULL);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %lx\n", status);
|
||||
|
||||
test_supported_protocols(&cred, 0);
|
||||
test_supported_algs(&cred);
|
||||
|
||||
status = QueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_PROTOCOLS, NULL);
|
||||
ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status);
|
||||
ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08lx, expected SEC_E_INTERNAL_ERROR\n", status);
|
||||
|
||||
status = QueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_ALGS, NULL);
|
||||
ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status);
|
||||
ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08lx, expected SEC_E_INTERNAL_ERROR\n", status);
|
||||
|
||||
FreeCredentialsHandle(&cred);
|
||||
|
||||
|
@ -254,7 +254,7 @@ static void test_cread_attrs(void)
|
|||
schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT;
|
||||
status = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, &schannel_cred, NULL, NULL, &cred, NULL);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %lx\n", status);
|
||||
|
||||
test_supported_protocols(&cred, SP_PROT_TLS1_CLIENT);
|
||||
test_supported_algs(&cred);
|
||||
|
@ -324,22 +324,22 @@ static void testAcquireSecurityContext(void)
|
|||
st = AcquireCredentialsHandleA(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
ok(st == SEC_E_SECPKG_NOT_FOUND,
|
||||
"Expected SEC_E_SECPKG_NOT_FOUND, got %08x\n", st);
|
||||
"Expected SEC_E_SECPKG_NOT_FOUND, got %08lx\n", st);
|
||||
if (0)
|
||||
{
|
||||
/* Crashes on Win2K */
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, 0, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
|
||||
|
||||
/* Crashes on WinNT */
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_BOTH, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
|
||||
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st);
|
||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
|
||||
|
||||
/* Crashes */
|
||||
AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
|
@ -347,18 +347,18 @@ static void testAcquireSecurityContext(void)
|
|||
}
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, NULL, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
||||
if(st == SEC_E_OK)
|
||||
FreeCredentialsHandle(&cred);
|
||||
memset(&cred, 0, sizeof(cred));
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, NULL, NULL, NULL, &cred, &exp);
|
||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
||||
/* expriy is indeterminate in win2k3 */
|
||||
trace("expiry: %08x%08x\n", exp.HighPart, exp.LowPart);
|
||||
trace("expiry: %08lx%08lx\n", exp.HighPart, exp.LowPart);
|
||||
|
||||
st = QueryCredentialsAttributesA(&cred, SECPKG_CRED_ATTR_NAMES, &names);
|
||||
ok(st == SEC_E_NO_CREDENTIALS || st == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", st);
|
||||
ok(st == SEC_E_NO_CREDENTIALS || st == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
|
||||
|
||||
FreeCredentialsHandle(&cred);
|
||||
|
||||
|
@ -368,25 +368,25 @@ static void testAcquireSecurityContext(void)
|
|||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */ ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */ ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
|
||||
|
||||
/* No cert in SCHANNEL_CRED succeeds for outbound.. */
|
||||
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
||||
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, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
||||
FreeCredentialsHandle(&cred);
|
||||
/* but fails for inbound. */
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_OK /* Vista/win2k8 */,
|
||||
"Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08x\n", st);
|
||||
"Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08lx\n", st);
|
||||
|
||||
if (0)
|
||||
{
|
||||
|
@ -405,12 +405,12 @@ static void testAcquireSecurityContext(void)
|
|||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS ||
|
||||
st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS ||
|
||||
st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
|
||||
|
||||
/* Good cert, but missing private key. Windows fails with
|
||||
* SEC_E_NO_CREDENTIALS, but I'll accept SEC_E_UNKNOWN_CREDENTIALS too.
|
||||
|
@ -422,37 +422,37 @@ static void testAcquireSecurityContext(void)
|
|||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_INTERNAL_ERROR, /* win2k */
|
||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS "
|
||||
"or SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||
"or SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_INTERNAL_ERROR, /* win2k */
|
||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS "
|
||||
"or SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||
"or SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
||||
|
||||
/* Good cert, with CRYPT_KEY_PROV_INFO set before it's had a key loaded. */
|
||||
ret = CertSetCertificateContextProperty(certs[1],
|
||||
CERT_KEY_PROV_INFO_PROP_ID, 0, &keyProvInfo);
|
||||
schanCred.dwVersion = SCH_CRED_V3;
|
||||
ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError());
|
||||
ok(ret, "CertSetCertificateContextProperty failed: %08lx\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 */ ||
|
||||
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 %08lx\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 */ ||
|
||||
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 %08lx\n", st);
|
||||
|
||||
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL,
|
||||
CRYPT_NEWKEYSET);
|
||||
ok(ret, "CryptAcquireContextW failed: %08x\n", GetLastError());
|
||||
ok(ret, "CryptAcquireContextW failed: %08lx\n", GetLastError());
|
||||
ret = 0;
|
||||
|
||||
ret = CryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key);
|
||||
ok(ret, "CryptImportKey failed: %08x\n", GetLastError());
|
||||
ok(ret, "CryptImportKey failed: %08lx\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
PCCERT_CONTEXT tmp;
|
||||
|
@ -470,23 +470,23 @@ static void testAcquireSecurityContext(void)
|
|||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */,
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */,
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
||||
schanCred.dwVersion = SCH_CRED_V2;
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */,
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
||||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_INTERNAL_ERROR ||
|
||||
st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */,
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||
"Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
||||
}
|
||||
|
||||
/* Succeeds on V3 or higher */
|
||||
|
@ -494,24 +494,24 @@ static void testAcquireSecurityContext(void)
|
|||
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_OK || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
|
||||
"AcquireCredentialsHandleA failed: %08x\n", st);
|
||||
"AcquireCredentialsHandleA failed: %08lx\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 */ ||
|
||||
st == SEC_E_INSUFFICIENT_MEMORY /* win10 */,
|
||||
"AcquireCredentialsHandleA failed: %08x\n", st);
|
||||
"AcquireCredentialsHandleA failed: %08lx\n", st);
|
||||
FreeCredentialsHandle(&cred);
|
||||
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
||||
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, "AcquireCredentialsHandleA failed: %08lx\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 */
|
||||
"AcquireCredentialsHandleA failed: %08x\n", st);
|
||||
"AcquireCredentialsHandleA failed: %08lx\n", st);
|
||||
if (st == SEC_E_OK) test_strength(&cred);
|
||||
FreeCredentialsHandle(&cred);
|
||||
|
||||
|
@ -522,12 +522,12 @@ static void testAcquireSecurityContext(void)
|
|||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS ||
|
||||
st == SEC_E_NO_CREDENTIALS /* Vista/win2k8 */ ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\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_NO_CREDENTIALS ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
|
||||
tmp = certs[0];
|
||||
certs[0] = certs[1];
|
||||
certs[1] = tmp;
|
||||
|
@ -535,11 +535,11 @@ static void testAcquireSecurityContext(void)
|
|||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS ||
|
||||
st == SEC_E_NO_CREDENTIALS ||
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st);
|
||||
st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\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_NO_CREDENTIALS,
|
||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
||||
/* FIXME: what about two valid certs? */
|
||||
|
||||
CryptDestroyKey(key);
|
||||
|
@ -667,7 +667,7 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c
|
|||
cred.dwFlags = flags;
|
||||
status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL,
|
||||
&cred, NULL, NULL, &cred_handle, NULL);
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
if (status != SEC_E_OK) return;
|
||||
|
||||
init_buffers(&out_buffers, 4, buf_size);
|
||||
|
@ -684,13 +684,13 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c
|
|||
buffer->cbBuffer = 0;
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ctxt_flags_req,
|
||||
0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL);
|
||||
ok(status == SEC_E_INSUFFICIENT_MEMORY, "%d: Expected SEC_E_INSUFFICIENT_MEMORY, got %08x\n", i, status);
|
||||
ok(status == SEC_E_INSUFFICIENT_MEMORY, "%d: Expected SEC_E_INSUFFICIENT_MEMORY, got %08lx\n", i, status);
|
||||
|
||||
if (i) init_sec_buffer(&out_buffers.pBuffers[0], buf_size, NULL);
|
||||
init_sec_buffer(buffer, 0, NULL);
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ctxt_flags_req | ISC_REQ_ALLOCATE_MEMORY, 0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08x\n", i, status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", i, status);
|
||||
if (i) FreeContextBuffer(out_buffers.pBuffers[0].pvBuffer);
|
||||
FreeContextBuffer(buffer->pvBuffer);
|
||||
DeleteSecurityContext(&context);
|
||||
|
@ -699,7 +699,7 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c
|
|||
init_sec_buffer(buffer, buf_size, !i ? buf : buf2);
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ctxt_flags_req,
|
||||
0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08x\n", i, status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", i, status);
|
||||
if (i) ok(!buffer->cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty\n");
|
||||
DeleteSecurityContext(&context);
|
||||
}
|
||||
|
@ -726,13 +726,13 @@ static void test_InitializeSecurityContext(void)
|
|||
cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS|SCH_CRED_MANUAL_CRED_VALIDATION;
|
||||
status = AcquireCredentialsHandleA(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);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status);
|
||||
if (status != SEC_E_OK) return;
|
||||
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM|ISC_REQ_ALLOCATE_MEMORY,
|
||||
0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
|
||||
|
||||
FreeContextBuffer(out_buffer.pvBuffer);
|
||||
DeleteSecurityContext(&context);
|
||||
|
@ -1054,7 +1054,7 @@ static void test_communication(void)
|
|||
|
||||
status = AcquireCredentialsHandleA(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);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status);
|
||||
if (status != SEC_E_OK) return;
|
||||
|
||||
/* Initialize the connection */
|
||||
|
@ -1065,7 +1065,7 @@ static void test_communication(void)
|
|||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
|
||||
|
||||
buffers[1].cBuffers = 1;
|
||||
buffers[1].pBuffers[0].BufferType = SECBUFFER_TOKEN;
|
||||
|
@ -1075,7 +1075,7 @@ static void test_communication(void)
|
|||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
|
||||
todo_wine
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
todo_wine
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
|
||||
|
||||
|
@ -1086,7 +1086,7 @@ static void test_communication(void)
|
|||
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
|
||||
|
||||
buffers[0].pBuffers[0].cbBuffer = 0;
|
||||
|
@ -1094,19 +1094,19 @@ static void test_communication(void)
|
|||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INSUFFICIENT_MEMORY || status == SEC_E_INVALID_TOKEN,
|
||||
"Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
"Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
|
||||
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, NULL, 0, &context, NULL, &attrs, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
|
||||
buffers[0].pBuffers[0].cbBuffer = buf_size;
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
|
||||
|
||||
buf = &buffers[0].pBuffers[0];
|
||||
send(sock, buf->pvBuffer, buf->cbBuffer, 0);
|
||||
|
@ -1116,7 +1116,7 @@ static void test_communication(void)
|
|||
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, NULL, 0, &context2, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#x.\n", status);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#lx.\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n");
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
|
||||
ok( context2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n");
|
||||
|
@ -1128,7 +1128,7 @@ static void test_communication(void)
|
|||
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#x.\n", status);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#lx.\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n");
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ static void test_communication(void)
|
|||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE || status == SEC_E_INVALID_TOKEN,
|
||||
"Got unexpected status %#x.\n", status);
|
||||
"Got unexpected status %#lx.\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n");
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ static void test_communication(void)
|
|||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, &buffers[1], 0, &context2, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE || status == SEC_E_INVALID_TOKEN,
|
||||
"Got unexpected status %#x.\n", status);
|
||||
"Got unexpected status %#lx.\n", status);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n");
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
|
||||
ok( context2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n");
|
||||
|
@ -1170,8 +1170,8 @@ static void test_communication(void)
|
|||
send(sock, buf->pvBuffer, buf->cbBuffer, 0);
|
||||
buf->cbBuffer = buf_size;
|
||||
|
||||
ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower);
|
||||
ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper);
|
||||
ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower);
|
||||
ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
|
||||
|
||||
buf = &buffers[1].pBuffers[0];
|
||||
ret = receive_data(sock, buf);
|
||||
|
@ -1189,19 +1189,19 @@ static void test_communication(void)
|
|||
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
|
||||
ok(status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */,
|
||||
"InitializeSecurityContext failed: %08x\n", status);
|
||||
"InitializeSecurityContext failed: %08lx\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);
|
||||
"got %08lx\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);
|
||||
ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08lx\n", status);
|
||||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (void*)&cert);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_REMOTE_CERT_CONTEXT) failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_REMOTE_CERT_CONTEXT) failed: %08lx\n", status);
|
||||
if(status == SEC_E_OK) {
|
||||
SecPkgContext_Bindings bindings = {0xdeadbeef, (void*)0xdeadbeef};
|
||||
|
||||
|
@ -1209,7 +1209,7 @@ static void test_communication(void)
|
|||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_ENDPOINT_BINDINGS, &bindings);
|
||||
ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION),
|
||||
"QueryContextAttributesW(SECPKG_ATTR_ENDPOINT_BINDINGS) failed: %08x\n", status);
|
||||
"QueryContextAttributesW(SECPKG_ATTR_ENDPOINT_BINDINGS) failed: %08lx\n", status);
|
||||
if(status == SEC_E_OK) {
|
||||
static const char prefix[] = "tls-server-end-point:";
|
||||
const char *p;
|
||||
|
@ -1217,17 +1217,17 @@ static void test_communication(void)
|
|||
DWORD hash_size;
|
||||
|
||||
ok(bindings.BindingsLength == sizeof(*bindings.Bindings) + sizeof(prefix)-1 + 32 /* hash size */,
|
||||
"bindings.BindingsLength = %u\n", bindings.BindingsLength);
|
||||
ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %x\n", bindings.Bindings->dwInitiatorAddrType);
|
||||
ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %x\n", bindings.Bindings->cbInitiatorLength);
|
||||
ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %x\n", bindings.Bindings->dwInitiatorOffset);
|
||||
ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %x\n", bindings.Bindings->dwAcceptorAddrType);
|
||||
ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %x\n", bindings.Bindings->cbAcceptorLength);
|
||||
ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %x\n", bindings.Bindings->dwAcceptorOffset);
|
||||
"bindings.BindingsLength = %lu\n", bindings.BindingsLength);
|
||||
ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %lx\n", bindings.Bindings->dwInitiatorAddrType);
|
||||
ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %lx\n", bindings.Bindings->cbInitiatorLength);
|
||||
ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %lx\n", bindings.Bindings->dwInitiatorOffset);
|
||||
ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %lx\n", bindings.Bindings->dwAcceptorAddrType);
|
||||
ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %lx\n", bindings.Bindings->cbAcceptorLength);
|
||||
ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %lx\n", bindings.Bindings->dwAcceptorOffset);
|
||||
ok(sizeof(*bindings.Bindings) + bindings.Bindings->cbApplicationDataLength == bindings.BindingsLength,
|
||||
"cbApplicationDataLength = %x\n", bindings.Bindings->cbApplicationDataLength);
|
||||
"cbApplicationDataLength = %lx\n", bindings.Bindings->cbApplicationDataLength);
|
||||
ok(bindings.Bindings->dwApplicationDataOffset == sizeof(*bindings.Bindings),
|
||||
"dwApplicationDataOffset = %x\n", bindings.Bindings->dwApplicationDataOffset);
|
||||
"dwApplicationDataOffset = %lx\n", bindings.Bindings->dwApplicationDataOffset);
|
||||
p = (const char*)(bindings.Bindings+1);
|
||||
ok(!memcmp(p, prefix, sizeof(prefix)-1), "missing prefix\n");
|
||||
p += sizeof(prefix)-1;
|
||||
|
@ -1235,7 +1235,7 @@ static void test_communication(void)
|
|||
hash_size = sizeof(hash);
|
||||
ret = CryptHashCertificate(0, CALG_SHA_256, 0, cert->pbCertEncoded, cert->cbCertEncoded, hash, &hash_size);
|
||||
if(ret) {
|
||||
ok(hash_size == 32, "hash_size = %u\n", hash_size);
|
||||
ok(hash_size == 32, "hash_size = %lu\n", hash_size);
|
||||
ok(!memcmp(hash, p, hash_size), "unexpected hash part\n");
|
||||
}else {
|
||||
win_skip("SHA 256 hash not supported.\n");
|
||||
|
@ -1248,23 +1248,23 @@ static void test_communication(void)
|
|||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_UNIQUE_BINDINGS, &bindings);
|
||||
ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION),
|
||||
"QueryContextAttributesW(SECPKG_ATTR_UNIQUE_BINDINGS) failed: %08x\n", status);
|
||||
"QueryContextAttributesW(SECPKG_ATTR_UNIQUE_BINDINGS) failed: %08lx\n", status);
|
||||
if(status == SEC_E_OK) {
|
||||
const char *p;
|
||||
static const char prefix[] = "tls-unique:";
|
||||
|
||||
ok(bindings.BindingsLength > sizeof(*bindings.Bindings) + sizeof(prefix)-1,
|
||||
"bindings.BindingsLength = %u\n", bindings.BindingsLength);
|
||||
ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %x\n", bindings.Bindings->dwInitiatorAddrType);
|
||||
ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %x\n", bindings.Bindings->cbInitiatorLength);
|
||||
ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %x\n", bindings.Bindings->dwInitiatorOffset);
|
||||
ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %x\n", bindings.Bindings->dwAcceptorAddrType);
|
||||
ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %x\n", bindings.Bindings->cbAcceptorLength);
|
||||
ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %x\n", bindings.Bindings->dwAcceptorOffset);
|
||||
"bindings.BindingsLength = %lu\n", bindings.BindingsLength);
|
||||
ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %lx\n", bindings.Bindings->dwInitiatorAddrType);
|
||||
ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %lx\n", bindings.Bindings->cbInitiatorLength);
|
||||
ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %lx\n", bindings.Bindings->dwInitiatorOffset);
|
||||
ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %lx\n", bindings.Bindings->dwAcceptorAddrType);
|
||||
ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %lx\n", bindings.Bindings->cbAcceptorLength);
|
||||
ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %lx\n", bindings.Bindings->dwAcceptorOffset);
|
||||
ok(sizeof(*bindings.Bindings) + bindings.Bindings->cbApplicationDataLength == bindings.BindingsLength,
|
||||
"cbApplicationDataLength = %x\n", bindings.Bindings->cbApplicationDataLength);
|
||||
"cbApplicationDataLength = %lx\n", bindings.Bindings->cbApplicationDataLength);
|
||||
ok(bindings.Bindings->dwApplicationDataOffset == sizeof(*bindings.Bindings),
|
||||
"dwApplicationDataOffset = %x\n", bindings.Bindings->dwApplicationDataOffset);
|
||||
"dwApplicationDataOffset = %lx\n", bindings.Bindings->dwApplicationDataOffset);
|
||||
p = (const char*)(bindings.Bindings+1);
|
||||
ok(!memcmp(p, prefix, sizeof(prefix)-1), "wrong prefix\n");
|
||||
FreeContextBuffer(bindings.Bindings);
|
||||
|
@ -1276,29 +1276,29 @@ static void test_communication(void)
|
|||
}
|
||||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_CONNECTION_INFO, (void*)&conn_info);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_CONNECTION_INFO) failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_CONNECTION_INFO) failed: %08lx\n", status);
|
||||
if(status == SEC_E_OK) {
|
||||
ok(conn_info.dwCipherStrength >= 128, "conn_info.dwCipherStrength = %d\n", conn_info.dwCipherStrength);
|
||||
ok(conn_info.dwHashStrength >= 128, "conn_info.dwHashStrength = %d\n", conn_info.dwHashStrength);
|
||||
ok(conn_info.dwCipherStrength >= 128, "conn_info.dwCipherStrength = %ld\n", conn_info.dwCipherStrength);
|
||||
ok(conn_info.dwHashStrength >= 128, "conn_info.dwHashStrength = %ld\n", conn_info.dwHashStrength);
|
||||
}
|
||||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_KEY_INFO, &key_info);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_KEY_INFO) failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_KEY_INFO) failed: %08lx\n", status);
|
||||
if(status == SEC_E_OK) {
|
||||
ok(broken(key_info.SignatureAlgorithm == 0 /* WinXP,2003 */) ||
|
||||
key_info.SignatureAlgorithm == CALG_RSA_SIGN,
|
||||
"key_info.SignatureAlgorithm = %04x\n", key_info.SignatureAlgorithm);
|
||||
"key_info.SignatureAlgorithm = %04lx\n", key_info.SignatureAlgorithm);
|
||||
ok(broken(key_info.SignatureAlgorithm == 0 /* WinXP,2003 */) ||
|
||||
!strcmp(key_info.sSignatureAlgorithmName, "RSA"),
|
||||
"key_info.sSignatureAlgorithmName = %s\n", key_info.sSignatureAlgorithmName);
|
||||
ok(key_info.KeySize >= 128, "key_info.KeySize = %d\n", key_info.KeySize);
|
||||
ok(key_info.KeySize >= 128, "key_info.KeySize = %ld\n", key_info.KeySize);
|
||||
}
|
||||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_STREAM_SIZES, &sizes);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_STREAM_SIZES) failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_STREAM_SIZES) failed: %08lx\n", status);
|
||||
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_NEGOTIATION_INFO, &info);
|
||||
ok(status == SEC_E_UNSUPPORTED_FUNCTION, "QueryContextAttributesA returned %08x\n", status);
|
||||
ok(status == SEC_E_UNSUPPORTED_FUNCTION, "QueryContextAttributesA returned %08lx\n", status);
|
||||
|
||||
reset_buffers(&buffers[0]);
|
||||
|
||||
|
@ -1318,7 +1318,7 @@ static void test_communication(void)
|
|||
buf->cbBuffer = sizes.cbTrailer;
|
||||
|
||||
status = EncryptMessage(&context, 0, &buffers[0], 0);
|
||||
ok(status == SEC_E_OK, "EncryptMessage failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "EncryptMessage failed: %08lx\n", status);
|
||||
if (status != SEC_E_OK)
|
||||
return;
|
||||
|
||||
|
@ -1332,29 +1332,29 @@ static void test_communication(void)
|
|||
/* Too few buffers */
|
||||
--buffers[0].cBuffers;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
|
||||
/* No data buffer */
|
||||
++buffers[0].cBuffers;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
|
||||
/* Two data buffers */
|
||||
buffers[0].pBuffers[0].BufferType = SECBUFFER_DATA;
|
||||
buffers[0].pBuffers[1].BufferType = SECBUFFER_DATA;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
|
||||
/* Too few empty buffers */
|
||||
buffers[0].pBuffers[1].BufferType = SECBUFFER_EXTRA;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
|
||||
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
|
||||
|
||||
/* Incomplete data */
|
||||
buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY;
|
||||
buffers[0].pBuffers[0].cbBuffer = (data[3]<<8) | data[4];
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Expected SEC_E_INCOMPLETE_MESSAGE, got %08x\n", status);
|
||||
ok(status == SEC_E_INCOMPLETE_MESSAGE, "Expected SEC_E_INCOMPLETE_MESSAGE, got %08lx\n", status);
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_MISSING, "Expected first buffer to be SECBUFFER_MISSING\n");
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 5, "Expected first buffer to be a five bytes\n");
|
||||
|
||||
|
@ -1366,21 +1366,21 @@ static void test_communication(void)
|
|||
buffers[0].pBuffers[2].BufferType = SECBUFFER_EMPTY;
|
||||
buffers[0].pBuffers[2].cbBuffer = 0;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_I_RENEGOTIATE, "Expected SEC_I_RENEGOTIATE, got %08x\n", status);
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "got %u\n", buffers[0].pBuffers[0].BufferType);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 5, "got %u\n", buffers[0].pBuffers[0].cbBuffer);
|
||||
ok(buffers[0].pBuffers[1].BufferType == SECBUFFER_DATA, "got %u\n", buffers[0].pBuffers[1].BufferType);
|
||||
ok(buffers[0].pBuffers[1].cbBuffer == 0, "got %u\n", buffers[0].pBuffers[1].cbBuffer);
|
||||
ok(buffers[0].pBuffers[2].BufferType == SECBUFFER_STREAM_TRAILER, "got %u\n", buffers[0].pBuffers[2].BufferType);
|
||||
todo_wine ok(buffers[0].pBuffers[2].cbBuffer == 32, "got %u\n", buffers[0].pBuffers[2].cbBuffer);
|
||||
ok(status == SEC_I_RENEGOTIATE, "Expected SEC_I_RENEGOTIATE, got %08lx\n", status);
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "got %lu\n", buffers[0].pBuffers[0].BufferType);
|
||||
ok(buffers[0].pBuffers[0].cbBuffer == 5, "got %lu\n", buffers[0].pBuffers[0].cbBuffer);
|
||||
ok(buffers[0].pBuffers[1].BufferType == SECBUFFER_DATA, "got %lu\n", buffers[0].pBuffers[1].BufferType);
|
||||
ok(buffers[0].pBuffers[1].cbBuffer == 0, "got %lu\n", buffers[0].pBuffers[1].cbBuffer);
|
||||
ok(buffers[0].pBuffers[2].BufferType == SECBUFFER_STREAM_TRAILER, "got %lu\n", buffers[0].pBuffers[2].BufferType);
|
||||
todo_wine ok(buffers[0].pBuffers[2].cbBuffer == 32, "got %lu\n", buffers[0].pBuffers[2].cbBuffer);
|
||||
|
||||
pfx.pbData = (BYTE *)pfxdata;
|
||||
pfx.cbData = sizeof(pfxdata);
|
||||
store = PFXImportCertStore(&pfx, NULL, CRYPT_EXPORTABLE|CRYPT_USER_KEYSET|PKCS12_NO_PERSIST_KEY);
|
||||
ok(store != NULL, "got %u\n", GetLastError());
|
||||
ok(store != NULL, "got %lu\n", GetLastError());
|
||||
|
||||
cert = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL);
|
||||
ok(cert != NULL, "got %u\n", GetLastError());
|
||||
ok(cert != NULL, "got %lu\n", GetLastError());
|
||||
|
||||
cred.paCred = &cert;
|
||||
cred.cCreds = 1;
|
||||
|
@ -1388,7 +1388,7 @@ static void test_communication(void)
|
|||
FreeCredentialsHandle(&cred_handle);
|
||||
status = AcquireCredentialsHandleA(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);
|
||||
ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status);
|
||||
|
||||
init_buffers(&buffers[0], 4, buf_size);
|
||||
init_buffers(&buffers[1], 4, buf_size);
|
||||
|
@ -1397,7 +1397,7 @@ static void test_communication(void)
|
|||
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
|
||||
0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL);
|
||||
todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
|
||||
todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
|
||||
if (status != SEC_I_CONTINUE_NEEDED)
|
||||
{
|
||||
skip("skipping remaining renegotiate test\n");
|
||||
|
@ -1425,8 +1425,8 @@ static void test_communication(void)
|
|||
send(sock, buf->pvBuffer, buf->cbBuffer, 0);
|
||||
buf->cbBuffer = buf_size;
|
||||
|
||||
todo_wine ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower);
|
||||
todo_wine ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper);
|
||||
todo_wine ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower);
|
||||
todo_wine ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
|
||||
|
||||
buf = &buffers[1].pBuffers[0];
|
||||
ret = receive_data(sock, buf);
|
||||
|
@ -1439,7 +1439,7 @@ static void test_communication(void)
|
|||
ISC_REQ_USE_SUPPLIED_CREDS, 0, 0, &buffers[1], 0, &context2, &buffers[0], &attrs, NULL);
|
||||
buffers[1].pBuffers[0].cbBuffer = buf_size;
|
||||
}
|
||||
ok (status == SEC_E_OK, "got %08x\n", status);
|
||||
ok (status == SEC_E_OK, "got %08lx\n", status);
|
||||
|
||||
buf = &buffers[0].pBuffers[0];
|
||||
buf->cbBuffer = buf_size;
|
||||
|
@ -1449,7 +1449,7 @@ static void test_communication(void)
|
|||
buffers[0].pBuffers[0].BufferType = SECBUFFER_DATA;
|
||||
buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY;
|
||||
status = DecryptMessage(&context, &buffers[0], 0, NULL);
|
||||
ok(status == SEC_E_OK, "DecryptMessage failed: %08x\n", status);
|
||||
ok(status == SEC_E_OK, "DecryptMessage failed: %08lx\n", status);
|
||||
if (status == SEC_E_OK)
|
||||
{
|
||||
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "Expected first buffer to be SECBUFFER_STREAM_HEADER\n");
|
||||
|
@ -1505,7 +1505,7 @@ static void test_application_protocol_negotiation(void)
|
|||
|
||||
status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL,
|
||||
&cred, NULL, NULL, &cred_handle, NULL);
|
||||
ok(status == SEC_E_OK, "got %08x\n", status);
|
||||
ok(status == SEC_E_OK, "got %08lx\n", status);
|
||||
if (status != SEC_E_OK) return;
|
||||
|
||||
init_buffers(&buffers[0], 4, buf_size);
|
||||
|
@ -1537,7 +1537,7 @@ static void test_application_protocol_negotiation(void)
|
|||
buffers[0].pBuffers[0].BufferType = SECBUFFER_TOKEN;
|
||||
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
|
||||
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[2], 0, &context, &buffers[0], &attrs, NULL);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status);
|
||||
ok(status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status);
|
||||
|
||||
buf = &buffers[0].pBuffers[0];
|
||||
send(sock, buf->pvBuffer, buf->cbBuffer, 0);
|
||||
|
@ -1561,8 +1561,8 @@ static void test_application_protocol_negotiation(void)
|
|||
send(sock, buf->pvBuffer, buf->cbBuffer, 0);
|
||||
buf->cbBuffer = buf_size;
|
||||
|
||||
ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower);
|
||||
ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper);
|
||||
ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower);
|
||||
ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
|
||||
|
||||
buf = &buffers[1].pBuffers[0];
|
||||
ret = receive_data(sock, buf);
|
||||
|
@ -1576,7 +1576,7 @@ static void test_application_protocol_negotiation(void)
|
|||
buffers[1].pBuffers[0].cbBuffer = buf_size;
|
||||
}
|
||||
|
||||
ok (status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */, "got %08x\n", status);
|
||||
ok (status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */, "got %08lx\n", status);
|
||||
if (status != SEC_E_OK)
|
||||
{
|
||||
skip("Handshake failed\n");
|
||||
|
@ -1585,7 +1585,7 @@ static void test_application_protocol_negotiation(void)
|
|||
|
||||
memset(&protocol, 0, sizeof(protocol));
|
||||
status = pQueryContextAttributesA(&context, SECPKG_ATTR_APPLICATION_PROTOCOL, &protocol);
|
||||
ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION) /* win2k8 */, "got %08x\n", status);
|
||||
ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION) /* win2k8 */, "got %08lx\n", status);
|
||||
if (status == SEC_E_OK)
|
||||
{
|
||||
ok(protocol.ProtoNegoStatus == SecApplicationProtocolNegotiationStatus_Success, "got %u\n", protocol.ProtoNegoStatus);
|
||||
|
@ -1636,7 +1636,7 @@ static void test_dtls(void)
|
|||
win_skip( "no DTLS support\n" );
|
||||
return;
|
||||
}
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
|
||||
flags_req = ISC_REQ_MANUAL_CRED_VALIDATION | ISC_REQ_EXTENDED_ERROR | ISC_REQ_DATAGRAM | ISC_REQ_USE_SUPPLIED_CREDS |
|
||||
ISC_REQ_CONFIDENTIALITY | ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT;
|
||||
|
@ -1654,15 +1654,15 @@ static void test_dtls(void)
|
|||
exp.LowPart = exp.HighPart = 0xdeadbeef;
|
||||
status = InitializeSecurityContextA( &cred_handle, NULL, (SEC_CHAR *)"winetest", flags_req, 0, 16, &buffers[0], 0,
|
||||
&ctx_handle, &buffers[1], &attr, &exp );
|
||||
ok( status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status );
|
||||
ok( status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status );
|
||||
|
||||
flags_ret = ISC_RET_MANUAL_CRED_VALIDATION | ISC_RET_STREAM | ISC_RET_EXTENDED_ERROR | ISC_RET_DATAGRAM |
|
||||
ISC_RET_USED_SUPPLIED_CREDS | ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT;
|
||||
ok( attr == flags_ret, "got %08x\n", attr );
|
||||
ok( !exp.LowPart, "got %08x\n", exp.LowPart );
|
||||
ok( !exp.HighPart, "got %08x\n", exp.HighPart );
|
||||
ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#x\n", buffers[1].pBuffers[1].BufferType);
|
||||
ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#x\n", buffers[1].pBuffers[1].cbBuffer);
|
||||
ok( attr == flags_ret, "got %08lx\n", attr );
|
||||
ok( !exp.LowPart, "got %08lx\n", exp.LowPart );
|
||||
ok( !exp.HighPart, "got %08lx\n", exp.HighPart );
|
||||
ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#lx\n", buffers[1].pBuffers[1].BufferType);
|
||||
ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#lx\n", buffers[1].pBuffers[1].cbBuffer);
|
||||
prev_buf_len = buffers[1].pBuffers[0].cbBuffer;
|
||||
buf = HeapAlloc( GetProcessHeap(), 0, prev_buf_len );
|
||||
memcpy( buf, buffers[1].pBuffers[0].pvBuffer, prev_buf_len );
|
||||
|
@ -1680,12 +1680,12 @@ static void test_dtls(void)
|
|||
ctx_handle2.dwLower = ctx_handle2.dwUpper = 0xdeadbeef;
|
||||
status = InitializeSecurityContextA( &cred_handle, &ctx_handle, (SEC_CHAR *)"winetest", flags_req, 0, 16, NULL, 0,
|
||||
&ctx_handle2, &buffers[1], &attr, &exp );
|
||||
ok( status == SEC_E_INSUFFICIENT_MEMORY, "got %08x\n", status );
|
||||
ok( status == SEC_E_INSUFFICIENT_MEMORY, "got %08lx\n", status );
|
||||
|
||||
flags_ret = ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT;
|
||||
todo_wine ok( attr == flags_ret, "got %08x\n", attr );
|
||||
ok( !exp.LowPart, "got %08x\n", exp.LowPart );
|
||||
ok( !exp.HighPart, "got %08x\n", exp.HighPart );
|
||||
todo_wine ok( attr == flags_ret, "got %08lx\n", attr );
|
||||
ok( !exp.LowPart, "got %08lx\n", exp.LowPart );
|
||||
ok( !exp.HighPart, "got %08lx\n", exp.HighPart );
|
||||
ok( ctx_handle2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n");
|
||||
ok( ctx_handle2.dwUpper == 0xdeadbeef, "Did not expect dwUpper to be set on new context\n");
|
||||
|
||||
|
@ -1697,20 +1697,20 @@ static void test_dtls(void)
|
|||
ctx_handle2.dwLower = ctx_handle2.dwUpper = 0xdeadbeef;
|
||||
status = InitializeSecurityContextA( &cred_handle, &ctx_handle, (SEC_CHAR *)"winetest", flags_req, 0, 16, NULL, 0,
|
||||
&ctx_handle2, &buffers[1], &attr, &exp );
|
||||
ok( status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status );
|
||||
ok( status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status );
|
||||
|
||||
flags_ret = ISC_RET_MANUAL_CRED_VALIDATION | ISC_RET_STREAM | ISC_RET_EXTENDED_ERROR | ISC_RET_DATAGRAM |
|
||||
ISC_RET_USED_SUPPLIED_CREDS | ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT;
|
||||
ok( attr == flags_ret, "got %08x\n", attr );
|
||||
todo_wine ok( exp.LowPart, "got %08x\n", exp.LowPart );
|
||||
todo_wine ok( exp.HighPart, "got %08x\n", exp.HighPart );
|
||||
ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#x\n", buffers[1].pBuffers[1].BufferType);
|
||||
ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#x\n", buffers[1].pBuffers[1].cbBuffer);
|
||||
ok( ctx_handle.dwLower == ctx_handle2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", ctx_handle.dwLower, ctx_handle2.dwLower);
|
||||
ok( ctx_handle.dwUpper == ctx_handle2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", ctx_handle.dwUpper, ctx_handle2.dwUpper);
|
||||
ok( attr == flags_ret, "got %08lx\n", attr );
|
||||
todo_wine ok( exp.LowPart, "got %08lx\n", exp.LowPart );
|
||||
todo_wine ok( exp.HighPart, "got %08lx\n", exp.HighPart );
|
||||
ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#lx\n", buffers[1].pBuffers[1].BufferType);
|
||||
ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#lx\n", buffers[1].pBuffers[1].cbBuffer);
|
||||
ok( ctx_handle.dwLower == ctx_handle2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", ctx_handle.dwLower, ctx_handle2.dwLower);
|
||||
ok( ctx_handle.dwUpper == ctx_handle2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", ctx_handle.dwUpper, ctx_handle2.dwUpper);
|
||||
|
||||
/* With no new input buffer, output buffer length should match prior call. */
|
||||
ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#x, got %#x\n",
|
||||
ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#lx, got %#lx\n",
|
||||
prev_buf_len, buffers[1].pBuffers[0].cbBuffer);
|
||||
|
||||
/*
|
||||
|
|
|
@ -77,14 +77,14 @@ static void testGetComputerObjectNameA(void)
|
|||
switch (formats[i])
|
||||
{
|
||||
case NameUnknown:
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
default:
|
||||
ok(GetLastError() == ERROR_NONE_MAPPED ||
|
||||
GetLastError() == ERROR_NO_SUCH_USER ||
|
||||
GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO ||
|
||||
GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
"%u: got %u\n", formats[i], GetLastError());
|
||||
"%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -97,10 +97,10 @@ static void testGetComputerObjectNameA(void)
|
|||
{
|
||||
case NameUnknown:
|
||||
ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]);
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
default:
|
||||
ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError());
|
||||
ok(rc, "GetComputerObjectName(%u) error %lu\n", formats[i], GetLastError());
|
||||
trace("GetComputerObjectName(%u) returned %s\n", formats[i], name);
|
||||
break;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ static void testGetComputerObjectNameW(void)
|
|||
switch (formats[i])
|
||||
{
|
||||
case NameUnknown:
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
default:
|
||||
ok(GetLastError() == ERROR_NONE_MAPPED ||
|
||||
|
@ -130,7 +130,7 @@ static void testGetComputerObjectNameW(void)
|
|||
GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO ||
|
||||
GetLastError() == WSAHOST_NOT_FOUND ||
|
||||
GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||
"%u: got %u\n", formats[i], GetLastError());
|
||||
"%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -143,10 +143,10 @@ static void testGetComputerObjectNameW(void)
|
|||
{
|
||||
case NameUnknown:
|
||||
ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]);
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError());
|
||||
break;
|
||||
default:
|
||||
ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError());
|
||||
ok(rc, "GetComputerObjectName(%u) error %lu\n", formats[i], GetLastError());
|
||||
trace("GetComputerObjectName(%u) returned %s\n", formats[i], wine_dbgstr_w(nameW));
|
||||
break;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ static void testGetUserNameExA(void)
|
|||
GetLastError() == ERROR_NONE_MAPPED ||
|
||||
broken(formats[i] == NameDnsDomain &&
|
||||
GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"GetUserNameExW(%d) failed: %d\n",
|
||||
"GetUserNameExW(%d) failed: %ld\n",
|
||||
formats[i], GetLastError());
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ static void testGetUserNameExA(void)
|
|||
|
||||
size = 0;
|
||||
rc = pGetUserNameExA(NameSamCompatible, NULL, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(size != 0, "Expected size to be set to required size\n");
|
||||
|
||||
if (0) /* Crashes on Windows with big enough size */
|
||||
|
@ -190,12 +190,12 @@ static void testGetUserNameExA(void)
|
|||
|
||||
size = 0;
|
||||
rc = pGetUserNameExA(NameSamCompatible, name, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(size != 0, "Expected size to be set to required size\n");
|
||||
size = 1;
|
||||
name[0] = 0xff;
|
||||
rc = pGetUserNameExA(NameSamCompatible, name, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(1 < size, "Expected size to be set to required size\n");
|
||||
ok(name[0] == (char) 0xff, "Expected unchanged buffer\n");
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ static void testGetUserNameExW(void)
|
|||
GetLastError() == ERROR_NONE_MAPPED ||
|
||||
broken(formats[i] == NameDnsDomain &&
|
||||
GetLastError() == ERROR_INVALID_PARAMETER),
|
||||
"GetUserNameExW(%d) failed: %d\n",
|
||||
"GetUserNameExW(%d) failed: %ld\n",
|
||||
formats[i], GetLastError());
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ static void testGetUserNameExW(void)
|
|||
|
||||
size = 0;
|
||||
rc = pGetUserNameExW(NameSamCompatible, NULL, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(size != 0, "Expected size to be set to required size\n");
|
||||
|
||||
if (0) /* Crashes on Windows with big enough size */
|
||||
|
@ -237,12 +237,12 @@ static void testGetUserNameExW(void)
|
|||
|
||||
size = 0;
|
||||
rc = pGetUserNameExW(NameSamCompatible, nameW, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(size != 0, "Expected size to be set to required size\n");
|
||||
size = 1;
|
||||
nameW[0] = 0xff;
|
||||
rc = pGetUserNameExW(NameSamCompatible, nameW, &size);
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
|
||||
ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError());
|
||||
ok(1 < size, "Expected size to be set to required size\n");
|
||||
ok(nameW[0] == (WCHAR) 0xff, "Expected unchanged buffer\n");
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ static void test_InitSecurityInterface(void)
|
|||
|
||||
sftA = pInitSecurityInterfaceA();
|
||||
ok(sftA != NULL, "pInitSecurityInterfaceA failed\n");
|
||||
ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftA->dwVersion);
|
||||
ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftA->dwVersion);
|
||||
ok(!sftA->Reserved2,
|
||||
"Reserved2 should be NULL instead of %p in security function table\n",
|
||||
sftA->Reserved2);
|
||||
|
@ -271,7 +271,7 @@ static void test_InitSecurityInterface(void)
|
|||
|
||||
sftW = pInitSecurityInterfaceW();
|
||||
ok(sftW != NULL, "pInitSecurityInterfaceW failed\n");
|
||||
ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftW->dwVersion);
|
||||
ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftW->dwVersion);
|
||||
ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2);
|
||||
ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n");
|
||||
ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n");
|
||||
|
@ -293,45 +293,45 @@ static void test_SspiEncodeStringsAsAuthIdentity(void)
|
|||
}
|
||||
|
||||
status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, NULL );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx\n", status );
|
||||
|
||||
id = (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, &id );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx\n", status );
|
||||
ok( id == (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef, "id set\n" );
|
||||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, password, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
pSspiFreeAuthIdentity( id );
|
||||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( NULL, domainname, password, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
pSspiFreeAuthIdentity( id );
|
||||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
pSspiFreeAuthIdentity( id );
|
||||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( username, NULL, NULL, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
pSspiFreeAuthIdentity( id );
|
||||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( username, domainname, password, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
|
||||
username_ptr = domainname_ptr = password_ptr = NULL;
|
||||
status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( !lstrcmpW( username, username_ptr ), "wrong username\n" );
|
||||
ok( !lstrcmpW( domainname, domainname_ptr ), "wrong domainname\n" );
|
||||
ok( !lstrcmpW( password, password_ptr ), "wrong password\n" );
|
||||
|
@ -345,13 +345,13 @@ static void test_SspiEncodeStringsAsAuthIdentity(void)
|
|||
|
||||
id = NULL;
|
||||
status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( id != NULL, "id not set\n" );
|
||||
|
||||
username_ptr = password_ptr = NULL;
|
||||
domainname_ptr = (const WCHAR *)0xdeadbeef;
|
||||
status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( !lstrcmpW( username, username_ptr ), "wrong username\n" );
|
||||
ok( domainname_ptr == NULL, "domainname_ptr not cleared\n" );
|
||||
ok( !lstrcmpW( password, password_ptr ), "wrong password\n" );
|
||||
|
@ -386,28 +386,28 @@ static void test_SspiPrepareForCredWrite(void)
|
|||
}
|
||||
|
||||
status = pSspiEncodeStringsAsAuthIdentity( usernameW, domainnameW, passwordW, &id );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
|
||||
type = size = 0;
|
||||
status = pSspiPrepareForCredWrite( id, NULL, &type, &target, &username, &blob, &size );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %lu\n", type );
|
||||
ok( !lstrcmpW( target, targetW ), "got %s\n", wine_dbgstr_w(target) );
|
||||
ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) );
|
||||
ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" );
|
||||
ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size );
|
||||
ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %lu\n", size );
|
||||
pSspiLocalFree( (void *)target );
|
||||
pSspiLocalFree( (void *)username );
|
||||
pSspiLocalFree( blob );
|
||||
|
||||
type = size = 0;
|
||||
status = pSspiPrepareForCredWrite( id, target2W, &type, &target, &username, &blob, &size );
|
||||
ok( status == SEC_E_OK, "got %08x\n", status );
|
||||
ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type );
|
||||
ok( status == SEC_E_OK, "got %08lx\n", status );
|
||||
ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %lu\n", type );
|
||||
ok( !lstrcmpW( target, target2W ), "got %s\n", wine_dbgstr_w(target) );
|
||||
ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) );
|
||||
ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" );
|
||||
ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size );
|
||||
ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %lu\n", size );
|
||||
pSspiLocalFree( (void *)target );
|
||||
pSspiLocalFree( (void *)username );
|
||||
pSspiLocalFree( blob );
|
||||
|
@ -450,17 +450,17 @@ static void test_kerberos(void)
|
|||
if(status != SEC_E_OK)
|
||||
return;
|
||||
|
||||
ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08x, expected %08x\n", info->fCapabilities, expected_flags );
|
||||
ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08lx, expected %08lx\n", info->fCapabilities, expected_flags );
|
||||
ok( info->wVersion == 1, "got %u\n", info->wVersion );
|
||||
ok( info->wRPCID == RPC_C_AUTHN_GSS_KERBEROS, "got %u\n", info->wRPCID );
|
||||
ok( info->cbMaxToken >= 12000, "got %u\n", info->cbMaxToken );
|
||||
ok( info->cbMaxToken >= 12000, "got %lu\n", info->cbMaxToken );
|
||||
ok( !lstrcmpA( info->Name, "Kerberos" ), "got %s\n", info->Name );
|
||||
ok( !lstrcmpA( info->Comment, "Microsoft Kerberos V1.0" ), "got %s\n", info->Comment );
|
||||
FreeContextBuffer( info );
|
||||
|
||||
status = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL,
|
||||
NULL, NULL, NULL, &cred, NULL );
|
||||
todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", status );
|
||||
todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", status );
|
||||
if(status == SEC_E_OK)
|
||||
FreeCredentialHandle( &cred );
|
||||
}
|
||||
|
@ -475,14 +475,14 @@ static void test_ticket_cache(void)
|
|||
LSA_STRING name;
|
||||
|
||||
status = LsaConnectUntrusted( &lsa );
|
||||
ok( !status, "got %08x\n", status );
|
||||
ok( !status, "got %08lx\n", status );
|
||||
|
||||
RtlInitAnsiString( &name, MICROSOFT_KERBEROS_NAME_A );
|
||||
status = LsaLookupAuthenticationPackage( lsa, &name, &package );
|
||||
ok( !status, "got %08x\n", status );
|
||||
ok( !status, "got %08lx\n", status );
|
||||
|
||||
status = LsaCallAuthenticationPackage( lsa, package, &req, sizeof(req), (void **)&resp, &len, &status );
|
||||
ok( !status, "got %08x\n", status );
|
||||
ok( !status, "got %08lx\n", status );
|
||||
ok( resp->MessageType == KerbQueryTicketCacheMessage, "got %u\n", resp->MessageType );
|
||||
|
||||
for (i = 0; i < resp->CountOfTickets; i++)
|
||||
|
@ -490,8 +490,8 @@ static void test_ticket_cache(void)
|
|||
KERB_TICKET_CACHE_INFO *info = &resp->Tickets[i];
|
||||
trace( "ServerName %s\n", wine_dbgstr_wn(info->ServerName.Buffer, info->ServerName.Length/sizeof(WCHAR)) );
|
||||
trace( "RealmName %s\n", wine_dbgstr_wn(info->RealmName.Buffer, info->RealmName.Length/sizeof(WCHAR)) );
|
||||
trace( "EncryptionType %08x\n", info->EncryptionType );
|
||||
trace( "TicketFlags %08x\n", info->TicketFlags );
|
||||
trace( "EncryptionType %08lx\n", info->EncryptionType );
|
||||
trace( "TicketFlags %08lx\n", info->TicketFlags );
|
||||
}
|
||||
LsaFreeReturnBuffer( resp );
|
||||
LsaDeregisterLogonProcess( lsa );
|
||||
|
|
Loading…
Reference in New Issue