Exemple #1
0
void nego_attempt_tls(rdpNego* nego)
{
	nego->RequestedProtocols = PROTOCOL_TLS;

	WLog_DBG(TAG, "Attempting TLS security");

	if (!nego_transport_connect(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (nego->state != NEGO_STATE_FINAL)
	{
		nego_transport_disconnect(nego);

		if (nego->EnabledProtocols[PROTOCOL_RDP])
			nego->state = NEGO_STATE_RDP;
		else
			nego->state = NEGO_STATE_FAIL;
	}
}
Exemple #2
0
void nego_attempt_tls(rdpNego* nego)
{
    nego->requested_protocols = PROTOCOL_TLS;

    DEBUG_NEGO("Attempting TLS security");

    if (!nego_tcp_connect(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }

    if (!nego_send_negotiation_request(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }

    if (!nego_recv_response(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }

    if (nego->state != NEGO_STATE_FINAL)
    {
        nego_tcp_disconnect(nego);

        if (nego->enabled_protocols[PROTOCOL_RDP] > 0)
            nego->state = NEGO_STATE_RDP;
        else
            nego->state = NEGO_STATE_FAIL;
    }
}
Exemple #3
0
void nego_attempt_rdp(rdpNego* nego)
{
	nego->requested_protocols = PROTOCOL_RDP;

	DEBUG_NEGO("Attempting RDP security");

	if (!nego_transport_connect(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
        freerdp_log(nego->transport->settings->instance, "Error: RDP Negotiation failure\n");
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
        freerdp_log(nego->transport->settings->instance, "Error: RDP Negotiation failure\n");
		nego->state = NEGO_STATE_FAIL;
		return;
	}
}
Exemple #4
0
void nego_attempt_nla(rdpNego* nego)
{
	nego->requested_protocols = PROTOCOL_NLA | PROTOCOL_TLS;

	DEBUG_NEGO("Attempting NLA security");

	if (!nego_transport_connect(nego))
	{
        freerdp_log(nego->transport->settings->instance, "Error: connection failure\n");
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
        freerdp_log(nego->transport->settings->instance, "Error: NLA Negotiation failure\n");
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
        freerdp_log(nego->transport->settings->instance, "Error: NLA Negotiation failure\n");
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	DEBUG_NEGO("state: %s", NEGO_STATE_STRINGS[nego->state]);
	if (nego->state != NEGO_STATE_FINAL)
	{
		nego_transport_disconnect(nego);

		if (nego->enabled_protocols[PROTOCOL_TLS] > 0)
			nego->state = NEGO_STATE_TLS;
		else if (nego->enabled_protocols[PROTOCOL_RDP] > 0)
			nego->state = NEGO_STATE_RDP;
		else {
			nego->state = NEGO_STATE_FAIL;
            freerdp_log(nego->transport->settings->instance, "Error: NLA Negotiation failure\n");
        }
	}
}
Exemple #5
0
void nego_attempt_ext(rdpNego* nego)
{
	nego->RequestedProtocols = PROTOCOL_NLA | PROTOCOL_TLS | PROTOCOL_EXT;

	WLog_DBG(TAG, "Attempting NLA extended security");

	if (!nego_transport_connect(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	WLog_DBG(TAG, "state: %s", NEGO_STATE_STRINGS[nego->state]);

	if (nego->state != NEGO_STATE_FINAL)
	{
		nego_transport_disconnect(nego);

		if (nego->EnabledProtocols[PROTOCOL_NLA])
			nego->state = NEGO_STATE_NLA;
		else if (nego->EnabledProtocols[PROTOCOL_TLS])
			nego->state = NEGO_STATE_TLS;
		else if (nego->EnabledProtocols[PROTOCOL_RDP])
			nego->state = NEGO_STATE_RDP;
		else
			nego->state = NEGO_STATE_FAIL;
	}
}
Exemple #6
0
void nego_attempt_nla(rdpNego* nego)
{
	nego->requested_protocols = PROTOCOL_NLA | PROTOCOL_TLS;

	DEBUG_NEGO("Attempting NLA security");

	if (!nego_transport_connect(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	DEBUG_NEGO("state: %s", NEGO_STATE_STRINGS[nego->state]);

	if (nego->state != NEGO_STATE_FINAL)
	{
		nego_transport_disconnect(nego);

		if (nego->enabled_protocols[PROTOCOL_TLS])
			nego->state = NEGO_STATE_TLS;
		else if (nego->enabled_protocols[PROTOCOL_RDP])
			nego->state = NEGO_STATE_RDP;
		else
			nego->state = NEGO_STATE_FAIL;
	}
}
Exemple #7
0
static void nego_attempt_rdp(rdpNego* nego)
{
	nego->RequestedProtocols = PROTOCOL_RDP;
	WLog_DBG(TAG, "Attempting RDP security");

	if (!nego_transport_connect(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_send_negotiation_request(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}

	if (!nego_recv_response(nego))
	{
		nego->state = NEGO_STATE_FAIL;
		return;
	}
}
Exemple #8
0
void nego_attempt_rdp(rdpNego* nego)
{
    nego->requested_protocols = PROTOCOL_RDP;

    DEBUG_NEGO("Attempting RDP security");

    if (!nego_tcp_connect(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }

    if (!nego_send_negotiation_request(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }

    if (!nego_recv_response(nego))
    {
        nego->state = NEGO_STATE_FAIL;
        return;
    }
}