libfreerdp-core: got further in TSG connection

This commit is contained in:
Marc-André Moreau 2012-11-14 23:06:56 -05:00
parent 93cf614ebf
commit c6a998d2c3
2 changed files with 17 additions and 1 deletions

View File

@ -75,6 +75,8 @@ COMMAND_LINE_ARGUMENT_A args[] =
{ "sec-ext", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "nla extended protocol security" },
{ "cert-name", COMMAND_LINE_VALUE_REQUIRED, "<name>", NULL, NULL, -1, NULL, "certificate name" },
{ "cert-ignore", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "ignore certificate" },
{ "authentication", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "authentication (hack!)" },
{ "encryption", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "encryption (hack!)" },
{ "version", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_VERSION, NULL, NULL, NULL, -1, NULL, "print version" },
{ "help", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_HELP, NULL, NULL, NULL, -1, "?", "print help" },
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
@ -710,6 +712,14 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
{
settings->IgnoreCertificate = TRUE;
}
CommandLineSwitchCase(arg, "authentication")
{
settings->Authentication = arg->Value ? TRUE : FALSE;
}
CommandLineSwitchCase(arg, "encryption")
{
settings->DisableEncryption = arg->Value ? FALSE : TRUE;
}
CommandLineSwitchDefault(arg)
{

View File

@ -962,6 +962,7 @@ int rpc_recv_fault_pdu(RPC_PDU_HEADER* header)
BOOL rpc_get_stub_data_info(rdpRpc* rpc, BYTE* header, UINT32* offset, UINT32* length)
{
UINT32 alloc_hint = 0;
RPC_PDU_HEADER* pCommonFields;
*offset = RPC_COMMON_FIELDS_LENGTH;
@ -971,11 +972,13 @@ BOOL rpc_get_stub_data_info(rdpRpc* rpc, BYTE* header, UINT32* offset, UINT32* l
{
*offset += 4;
rpc_offset_align(offset, 8);
alloc_hint = *((UINT32*) &header[16]);
}
else if (pCommonFields->ptype == PTYPE_REQUEST)
{
*offset += 4;
rpc_offset_align(offset, 8);
alloc_hint = *((UINT32*) &header[16]);
}
else
{
@ -984,6 +987,9 @@ BOOL rpc_get_stub_data_info(rdpRpc* rpc, BYTE* header, UINT32* offset, UINT32* l
if (length)
{
if (alloc_hint > 0)
*length = alloc_hint;
else
*length = pCommonFields->frag_length - (pCommonFields->auth_length + *offset);
}