Exemple #1
0
void test_gcc_write_client_security_data(void)
{
	STREAM* s;
	rdpSettings* settings;

	s = stream_new(12);
	settings = settings_new();

	settings->encryption_method =
			ENCRYPTION_METHOD_40BIT |
			ENCRYPTION_METHOD_56BIT |
			ENCRYPTION_METHOD_128BIT |
			ENCRYPTION_METHOD_FIPS;

	gcc_write_client_security_data(s, settings);

	ASSERT_STREAM(s, (uint8*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
}
Exemple #2
0
void test_gcc_write_client_security_data(void)
{
	wStream* s;
	rdpSettings* settings;

	s = stream_new(12);
	settings = freerdp_settings_new(NULL);

	settings->DisableEncryption = 1; /* turn on encryption */
	settings->EncryptionMethods =
			ENCRYPTION_METHOD_40BIT |
			ENCRYPTION_METHOD_56BIT |
			ENCRYPTION_METHOD_128BIT |
			ENCRYPTION_METHOD_FIPS;

	gcc_write_client_security_data(s, settings);

	ASSERT_STREAM(s, (BYTE*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
}
Exemple #3
0
void gcc_write_client_data_blocks(wStream* s, rdpMcs* mcs)
{
	rdpSettings* settings = mcs->settings;

	gcc_write_client_core_data(s, mcs);
	gcc_write_client_cluster_data(s, mcs);
	gcc_write_client_security_data(s, mcs);
	gcc_write_client_network_data(s, mcs);

	/* extended client data supported */

	if (settings->NegotiationFlags & EXTENDED_CLIENT_DATA_SUPPORTED)
	{
		if (settings->UseMultimon && !settings->SpanMonitors)
		{
			gcc_write_client_monitor_data(s, mcs);
		}

		gcc_write_client_message_channel_data(s, mcs);
		gcc_write_client_multitransport_channel_data(s, mcs);
	}
	else
	{
		if (settings->UseMultimon && !settings->SpanMonitors)
		{
			WLog_ERR(TAG,  "WARNING: true multi monitor support was not advertised by server!");

			if (settings->ForceMultimon)
			{
				WLog_ERR(TAG,  "Sending multi monitor information anyway (may break connectivity!)");
				gcc_write_client_monitor_data(s, mcs);
			}
			else
			{
				WLog_ERR(TAG,  "Use /multimon:force to force sending multi monitor information");
			}
		}
	}
}