예제 #1
0
파일: gcc.c 프로젝트: vworkspace/FreeRDP
BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs)
{
	UINT16 length;
	BYTE choice;
	BYTE number;
	BYTE selection;

	/* ConnectData */
	if (!per_read_choice(s, &choice))
		return FALSE;
	if (!per_read_object_identifier(s, t124_02_98_oid))
		return FALSE;

	/* ConnectData::connectPDU (OCTET_STRING) */
	if (!per_read_length(s, &length))
		return FALSE;

	/* ConnectGCCPDU */
	if (!per_read_choice(s, &choice))
		return FALSE;
	if (!per_read_selection(s, &selection))
		return FALSE;

	/* ConferenceCreateRequest::conferenceName */
	if (!per_read_numeric_string(s, 1)) /* ConferenceName::numeric */
		return FALSE;
	if (!per_read_padding(s, 1)) /* padding */
		return FALSE;

	/* UserData (SET OF SEQUENCE) */
	if (!per_read_number_of_sets(s, &number) || number != 1) /* one set of UserData */
		return FALSE;
	if (!per_read_choice(s, &choice) || choice != 0xC0) /* UserData::value present + select h221NonStandard (1) */
		return FALSE;

	/* h221NonStandard */
	if (!per_read_octet_string(s, h221_cs_key, 4, 4)) /* h221NonStandard, client-to-server H.221 key, "Duca" */
		return FALSE;

	/* userData::value (OCTET_STRING) */
	if (!per_read_length(s, &length))
		return FALSE;
	if (Stream_GetRemainingLength(s) < length)
		return FALSE;
	if (!gcc_read_client_data_blocks(s, mcs, length))
		return FALSE;

	return TRUE;
}
예제 #2
0
파일: gcc.c 프로젝트: johnsonyes/FreeRDP
boolean gcc_read_conference_create_request(STREAM* s, rdpSettings* settings)
{
	uint16 length;
	uint8 choice;
	uint8 number;
	uint8 selection;

	/* ConnectData */
	if (!per_read_choice(s, &choice))
		return false;
	if (!per_read_object_identifier(s, t124_02_98_oid))
		return false;

	/* ConnectData::connectPDU (OCTET_STRING) */
	if (!per_read_length(s, &length))
		return false;

	/* ConnectGCCPDU */
	if (!per_read_choice(s, &choice))
		return false;
	if (!per_read_selection(s, &selection))
		return false;

	/* ConferenceCreateRequest::conferenceName */
	if (!per_read_numeric_string(s, 1)) /* ConferenceName::numeric */
		return false;
	if (!per_read_padding(s, 1)) /* padding */
		return false;

	/* UserData (SET OF SEQUENCE) */
	if (!per_read_number_of_sets(s, &number) || number != 1) /* one set of UserData */
		return false;
	if (!per_read_choice(s, &choice) || choice != 0xC0) /* UserData::value present + select h221NonStandard (1) */
		return false;

	/* h221NonStandard */
	if (!per_read_octet_string(s, h221_cs_key, 4, 4)) /* h221NonStandard, client-to-server H.221 key, "Duca" */
		return false;

	/* userData::value (OCTET_STRING) */
	if (!per_read_length(s, &length))
		return false;
	if (stream_get_left(s) < length)
		return false;
	if (!gcc_read_client_data_blocks(s, settings, length))
		return false;

	return true;
}