FreeRDP
TestCommonAssistance.c File Reference
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/ssl.h>
#include <winpr/wlog.h>
#include <winpr/platform.h>
#include <freerdp/assistance.h>

Functions

static BOOL run_test_parse (wLog *log, const char *input, size_t len, const char *password, BOOL expect)
 
static BOOL test_file_to_settings (wLog *log, rdpAssistanceFile *file)
 
static BOOL test_file_from_buffer (wLog *log, const char *data, size_t size, const char *pwd)
 
static BOOL test_msrsc_incident_file_type1 (wLog *log)
 
static BOOL test_msrsc_incident_file_type2 (wLog *log)
 
int TestCommonAssistance (int argc, char *argv[])
 

Variables

static const char TEST_MSRC_INCIDENT_PASSWORD_TYPE1 [] = "Password1"
 
static const char TEST_MSRC_INCIDENT_FILE_TYPE1 []
 
WINPR_PRAGMA_DIAG_PUSH static WINPR_PRAGMA_DIAG_IGNORED_UNUSED_CONST_VAR const BYTE TEST_MSRC_INCIDENT_EXPERT_BLOB_TYPE1 [32]
 
static WINPR_PRAGMA_DIAG_POP const char TEST_MSRC_INCIDENT_PASSWORD_TYPE2 [] = "48BJQ853X3B4"
 
static const char TEST_MSRC_INCIDENT_FILE_TYPE2 []
 
static const char connectionstr2 []
 
static const char * fail_tests []
 
static const char connectionstr3 []
 
static const char connectionpwd3 [] = "4X638PTVZTKZ"
 

Function Documentation

◆ run_test_parse()

static BOOL run_test_parse ( wLog *  log,
const char *  input,
size_t  len,
const char *  password,
BOOL  expect 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_file_from_buffer()

static BOOL test_file_from_buffer ( wLog *  log,
const char *  data,
size_t  size,
const char *  pwd 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_file_to_settings()

static BOOL test_file_to_settings ( wLog *  log,
rdpAssistanceFile *  file 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_msrsc_incident_file_type1()

static BOOL test_msrsc_incident_file_type1 ( wLog *  log)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_msrsc_incident_file_type2()

static BOOL test_msrsc_incident_file_type2 ( wLog *  log)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestCommonAssistance()

int TestCommonAssistance ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

Variable Documentation

◆ connectionpwd3

const char connectionpwd3[] = "4X638PTVZTKZ"
static

◆ connectionstr2

const char connectionstr2[]
static
Initial value:
=
"<E>\n"
"<A KH=\"YiKwWUY8Ioq5NB3wAQHSbs5kwrM=\"\n"
"KH2=\"sha256:wKSAkAV3sBfa9WpuRFJcP9q1twJc6wOBuoJ9tsyXwpk=\"\n"
"ID=\"8rYm30RBW8/4dAWoUsWbFCF5jno/7jr5tNpHQc2goLbw4uuBBJvLsU02YYLlBMg5\"/>\n"
"<C>\n"
"<T ID=\"1\" SID=\"1440550163\">\n"
"<L P=\"49749\" N=\"2001:4898:1a:5:79e2:3356:9b22:3470\"/>\n"
"<L P=\"49751\" N=\"172.31.250.64\"/>\n"
"</T>\n"
"</C>\n"
"</E>"

Decrypted Connection String 2:

<E> <T ID="1" SID="0"> <L P="49228" N="fe80::1032:53d9:5a01:909b%3"> <L P="49229" N="fe80::3d8f:9b2d:6b4e:6aa%6"> <L P="49230" N="192.168.1.200"> <L P="49231" N="169.254.6.170"> </T> </E>

◆ connectionstr3

const char connectionstr3[]
static

◆ fail_tests

const char* fail_tests[]
static
Initial value:
= {
"<UPLOADINFOTYPE=\"Escalated\"><UPLOADDATARCTICKET=\"65538,1, ,*,,*,*,\"/></UPLOADINFO>",
"<UPLOADINFO>(E><UPLOADDATA "
"FOTYPE=\"Escalated\"æÁATAPassStub=\"␕:&A&amp;␅RCTICKET=\"65538,1,ü,*,n,*,*,\"am␡/>␂</"
"UPLOADINFO>"
}

◆ TEST_MSRC_INCIDENT_EXPERT_BLOB_TYPE1

WINPR_PRAGMA_DIAG_PUSH static WINPR_PRAGMA_DIAG_IGNORED_UNUSED_CONST_VAR const BYTE TEST_MSRC_INCIDENT_EXPERT_BLOB_TYPE1[32]
static
Initial value:
=
"\x3C\x9C\xAE\x0B\xCE\x7A\xB1\x5C\x8A\xAC\x01\xD6\x76\x04\x5E\xDF"
"\x3F\xFA\xF0\x92\xE2\xDE\x36\x8A\x20\x17\xE6\x8A\x0D\xED\x7C\x90"

◆ TEST_MSRC_INCIDENT_FILE_TYPE1

const char TEST_MSRC_INCIDENT_FILE_TYPE1[]
static
Initial value:
=
"<?xml version=\"1.0\" encoding=\"Unicode\" ?>"
"<UPLOADINFO TYPE=\"Escalated\">"
"<UPLOADDATA "
"USERNAME=\"Administrator\" "
"RCTICKET=\"65538,1,10.0.3.105:3389;winxpsp3.contoso3.com:3389,*,"
"rb+v0oPmEISmi8N2zK/vuhgul/ABqlDt6wW0VxMyxK8=,*,*,IuaRySSbPDNna4+2mKcsKxsbJFI=\""
"RCTICKETENCRYPTED=\"1\" "
"DtStart=\"1314905741\" "
"DtLength=\"180\" "
"PassStub=\"RT=0PvIndan52*\" "
"L=\"0\" />"
"</UPLOADINFO>"

◆ TEST_MSRC_INCIDENT_FILE_TYPE2

const char TEST_MSRC_INCIDENT_FILE_TYPE2[]
static

◆ TEST_MSRC_INCIDENT_PASSWORD_TYPE1

const char TEST_MSRC_INCIDENT_PASSWORD_TYPE1[] = "Password1"
static

◆ TEST_MSRC_INCIDENT_PASSWORD_TYPE2

WINPR_PRAGMA_DIAG_POP const char TEST_MSRC_INCIDENT_PASSWORD_TYPE2[] = "48BJQ853X3B4"
static