Ejemplo n.º 1
0
BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
{
	BOOL success = FALSE;
	rdpNtlm* ntlm = rpc->NtlmHttpIn->ntlm;

	if (rpc_ncacn_http_ntlm_init(rpc, TSG_CHANNEL_IN) == 1)
	{
		success = TRUE;

		/* Send IN Channel Request */

		rpc_ncacn_http_send_in_channel_request(rpc);

		/* Receive IN Channel Response */

		rpc_ncacn_http_recv_in_channel_response(rpc);

		/* Send IN Channel Request */

		rpc_ncacn_http_send_in_channel_request(rpc);

		ntlm_client_uninit(ntlm);
	}

	ntlm_free(ntlm);

	rpc->NtlmHttpIn->ntlm = NULL;

	return success;
}
Ejemplo n.º 2
0
static int rpc_in_channel_connect(RpcInChannel* inChannel, int timeout)
{
	rdpRpc* rpc = inChannel->rpc;

	/* Connect IN Channel */

	if (rpc_channel_tls_connect((RpcChannel*) inChannel, timeout) < 0)
		return -1;

	rpc_in_channel_transition_to_state(inChannel, CLIENT_IN_CHANNEL_STATE_CONNECTED);

	if (rpc_ncacn_http_ntlm_init(rpc, (RpcChannel*) inChannel) < 0)
		return -1;

	/* Send IN Channel Request */

	if (rpc_ncacn_http_send_in_channel_request(rpc, inChannel) < 0)
	{
		WLog_ERR(TAG, "rpc_ncacn_http_send_in_channel_request failure");
		return -1;
	}

	rpc_in_channel_transition_to_state(inChannel, CLIENT_IN_CHANNEL_STATE_SECURITY);
	return 1;
}
Ejemplo n.º 3
0
BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
{
	rdpNtlm* ntlm = rpc->NtlmHttpIn->ntlm;

	rpc_ncacn_http_ntlm_init(rpc, TSG_CHANNEL_IN);

	/* Send IN Channel Request */

	rpc_ncacn_http_send_in_channel_request(rpc);

	/* Receive IN Channel Response */

	rpc_ncacn_http_recv_in_channel_response(rpc);

	/* Send IN Channel Request */

	rpc_ncacn_http_send_in_channel_request(rpc);

	ntlm_client_uninit(ntlm);
	ntlm_free(ntlm);

	return TRUE;
}