BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc) { rdpNtlm* ntlm = rpc->NtlmHttpOut->ntlm; BOOL success = FALSE; if (rpc_ncacn_http_ntlm_init(rpc, TSG_CHANNEL_OUT) == 1) { success = TRUE; /* Send OUT Channel Request */ rpc_ncacn_http_send_out_channel_request(rpc); /* Receive OUT Channel Response */ rpc_ncacn_http_recv_out_channel_response(rpc); /* Send OUT Channel Request */ rpc_ncacn_http_send_out_channel_request(rpc); ntlm_client_uninit(ntlm); } ntlm_free(ntlm); rpc->NtlmHttpOut->ntlm = NULL; return success; }
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; }
int rpc_out_channel_replacement_connect(RpcOutChannel* outChannel, int timeout) { rdpRpc* rpc = outChannel->rpc; /* Connect OUT Channel */ if (rpc_channel_tls_connect((RpcChannel*) outChannel, timeout) < 0) return -1; rpc_out_channel_transition_to_state(outChannel, CLIENT_OUT_CHANNEL_STATE_CONNECTED); if (rpc_ncacn_http_ntlm_init(rpc, (RpcChannel*) outChannel) < 0) return FALSE; /* Send OUT Channel Request */ if (rpc_ncacn_http_send_out_channel_request(rpc, outChannel, TRUE) < 0) { WLog_ERR(TAG, "rpc_ncacn_http_send_out_channel_request failure"); return FALSE; } rpc_out_channel_transition_to_state(outChannel, CLIENT_OUT_CHANNEL_STATE_SECURITY); return 1; }
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; }
BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc) { rdpNtlm* ntlm = rpc->NtlmHttpOut->ntlm; rpc_ncacn_http_ntlm_init(rpc, TSG_CHANNEL_OUT); /* Send OUT Channel Request */ rpc_ncacn_http_send_out_channel_request(rpc); /* Receive OUT Channel Response */ rpc_ncacn_http_recv_out_channel_response(rpc); /* Send OUT Channel Request */ rpc_ncacn_http_send_out_channel_request(rpc); ntlm_client_uninit(ntlm); ntlm_free(ntlm); return TRUE; }