|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#include <stdio.h>
|
|
Packit Service |
fa4841 |
#include <winpr/crt.h>
|
|
Packit Service |
fa4841 |
#include <winpr/windows.h>
|
|
Packit Service |
b1ea74 |
#include <winpr/path.h>
|
|
Packit Service |
b1ea74 |
#include <winpr/crypto.h>
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#include <freerdp/client/file.h>
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
static const BYTE testRdpFileUTF16[] = {
|
|
Packit Service |
b1ea74 |
0xff, 0xfe, 0x73, 0x00, 0x63, 0x00, 0x72, 0x00, 0x65, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00,
|
|
Packit Service |
b1ea74 |
0x6d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x64, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x32, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x75, 0x00, 0x73, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x20, 0x00, 0x6d, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x77, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x64, 0x00, 0x74, 0x00, 0x68, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x39, 0x00,
|
|
Packit Service |
b1ea74 |
0x32, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x6b, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x68, 0x00, 0x65, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x30, 0x00, 0x38, 0x00, 0x30, 0x00,
|
|
Packit Service |
b1ea74 |
0x0d, 0x00, 0x0a, 0x00, 0x73, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x20, 0x00, 0x62, 0x00, 0x70, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x33, 0x00, 0x32, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x77, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x70, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x73, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x30, 0x00, 0x2c, 0x00, 0x31, 0x00, 0x2c, 0x00, 0x35, 0x00, 0x35, 0x00, 0x33, 0x00, 0x2c, 0x00,
|
|
Packit Service |
b1ea74 |
0x32, 0x00, 0x31, 0x00, 0x31, 0x00, 0x2c, 0x00, 0x31, 0x00, 0x33, 0x00, 0x35, 0x00, 0x33, 0x00,
|
|
Packit Service |
b1ea74 |
0x2c, 0x00, 0x38, 0x00, 0x31, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x63, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6d, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x6b, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x79, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x61, 0x00, 0x72, 0x00, 0x64, 0x00, 0x68, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x6f, 0x00, 0x6b, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x32, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x61, 0x00, 0x75, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x63, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x74, 0x00, 0x75, 0x00, 0x72, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x76, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
|
|
Packit Service |
b1ea74 |
0x62, 0x00, 0x61, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x63, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00,
|
|
Packit Service |
b1ea74 |
0x20, 0x00, 0x74, 0x00, 0x79, 0x00, 0x70, 0x00, 0x65, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x37, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x74, 0x00, 0x77, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x6b, 0x00, 0x61, 0x00, 0x75, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00,
|
|
Packit Service |
b1ea74 |
0x0d, 0x00, 0x0a, 0x00, 0x62, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x77, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x64, 0x00, 0x74, 0x00, 0x68, 0x00, 0x61, 0x00, 0x75, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x70, 0x00, 0x6c, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x79, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x72, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x77, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x6b, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x61, 0x00, 0x63, 0x00, 0x65, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x62, 0x00,
|
|
Packit Service |
b1ea74 |
0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x77, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x70, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x70, 0x00, 0x65, 0x00, 0x72, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00,
|
|
Packit Service |
b1ea74 |
0x0d, 0x00, 0x0a, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x20, 0x00,
|
|
Packit Service |
b1ea74 |
0x66, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x73, 0x00, 0x6d, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x74, 0x00, 0x68, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x3a, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x77, 0x00, 0x20, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x74, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x20, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x62, 0x00,
|
|
Packit Service |
b1ea74 |
0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x66, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00,
|
|
Packit Service |
b1ea74 |
0x77, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x20, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x61, 0x00, 0x67, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x20, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x20, 0x00, 0x61, 0x00, 0x6e, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x6d, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x20, 0x00, 0x74, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x73, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x63, 0x00, 0x75, 0x00, 0x72, 0x00,
|
|
Packit Service |
b1ea74 |
0x73, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x74, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x62, 0x00, 0x69, 0x00, 0x74, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x70, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x70, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x66, 0x00,
|
|
Packit Service |
b1ea74 |
0x75, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x64, 0x00, 0x64, 0x00, 0x72, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x4c, 0x00, 0x41, 0x00,
|
|
Packit Service |
b1ea74 |
0x42, 0x00, 0x31, 0x00, 0x2d, 0x00, 0x57, 0x00, 0x37, 0x00, 0x2d, 0x00, 0x44, 0x00, 0x4d, 0x00,
|
|
Packit Service |
b1ea74 |
0x2d, 0x00, 0x30, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x62, 0x00, 0x31, 0x00,
|
|
Packit Service |
b1ea74 |
0x2e, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6c, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x63, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x61, 0x00, 0x75, 0x00,
|
|
Packit Service |
b1ea74 |
0x64, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x65, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x70, 0x00, 0x72, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x74, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x73, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x72, 0x00, 0x74, 0x00, 0x63, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x64, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x63, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x70, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x64, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x64, 0x00, 0x65, 0x00, 0x76, 0x00, 0x69, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x75, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00,
|
|
Packit Service |
b1ea74 |
0x20, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x61, 0x00, 0x75, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x69, 0x00, 0x63, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x76, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x6c, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x32, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x74, 0x00, 0x20, 0x00, 0x66, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x63, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x74, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x67, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x69, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x63, 0x00, 0x75, 0x00, 0x72, 0x00, 0x69, 0x00, 0x74, 0x00, 0x79, 0x00, 0x20, 0x00, 0x6c, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x79, 0x00, 0x65, 0x00, 0x72, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00,
|
|
Packit Service |
b1ea74 |
0x0d, 0x00, 0x0a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x61, 0x00, 0x70, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x61, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x65, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x72, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x20, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x0d, 0x00,
|
|
Packit Service |
b1ea74 |
0x0a, 0x00, 0x73, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x77, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x72, 0x00, 0x6b, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x20, 0x00, 0x64, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x79, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x67, 0x00, 0x61, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x77, 0x00, 0x61, 0x00, 0x79, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x74, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x4c, 0x00,
|
|
Packit Service |
b1ea74 |
0x41, 0x00, 0x42, 0x00, 0x31, 0x00, 0x2d, 0x00, 0x57, 0x00, 0x32, 0x00, 0x4b, 0x00, 0x38, 0x00,
|
|
Packit Service |
b1ea74 |
0x52, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x47, 0x00, 0x57, 0x00, 0x2e, 0x00, 0x6c, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x62, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x6b, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x2e, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x63, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x67, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x77, 0x00, 0x61, 0x00, 0x79, 0x00, 0x75, 0x00,
|
|
Packit Service |
b1ea74 |
0x73, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x68, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x64, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x67, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x77, 0x00, 0x61, 0x00, 0x79, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x69, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x6c, 0x00, 0x73, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x72, 0x00, 0x63, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x67, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x74, 0x00, 0x65, 0x00, 0x77, 0x00, 0x61, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x66, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x75, 0x00, 0x73, 0x00, 0x61, 0x00, 0x67, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x74, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x6d, 0x00, 0x70, 0x00, 0x74, 0x00, 0x63, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x65, 0x00,
|
|
Packit Service |
b1ea74 |
0x6e, 0x00, 0x74, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x75, 0x00,
|
|
Packit Service |
b1ea74 |
0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x72, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x73, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x6d, 0x00, 0x65, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00, 0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x64, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x64, 0x00, 0x63, 0x00,
|
|
Packit Service |
b1ea74 |
0x70, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x78, 0x00, 0x79, 0x00, 0x3a, 0x00, 0x69, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x30, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x6b, 0x00, 0x64, 0x00, 0x63, 0x00, 0x70, 0x00, 0x72, 0x00,
|
|
Packit Service |
b1ea74 |
0x6f, 0x00, 0x78, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x3a, 0x00,
|
|
Packit Service |
b1ea74 |
0x73, 0x00, 0x3a, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x64, 0x00, 0x72, 0x00, 0x69, 0x00, 0x76, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x69, 0x00,
|
|
Packit Service |
b1ea74 |
0x72, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x2a, 0x00,
|
|
Packit Service |
b1ea74 |
0x0d, 0x00, 0x0a, 0x00, 0x75, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6e, 0x00, 0x61, 0x00,
|
|
Packit Service |
b1ea74 |
0x6d, 0x00, 0x65, 0x00, 0x3a, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x4c, 0x00, 0x41, 0x00, 0x42, 0x00,
|
|
Packit Service |
b1ea74 |
0x31, 0x00, 0x5c, 0x00, 0x4a, 0x00, 0x6f, 0x00, 0x68, 0x00, 0x6e, 0x00, 0x44, 0x00, 0x6f, 0x00,
|
|
Packit Service |
b1ea74 |
0x65, 0x00, 0x0d, 0x00, 0x0a, 0x00
|
|
Packit Service |
bb5c11 |
};
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
static char testRdpFileUTF8[] = "screen mode id:i:2\n"
|
|
Packit Service |
b1ea74 |
"use multimon:i:0\n"
|
|
Packit Service |
b1ea74 |
"desktopwidth:i:1920\n"
|
|
Packit Service |
b1ea74 |
"desktopheight:i:1080\n"
|
|
Packit Service |
b1ea74 |
"session bpp:i:32\n"
|
|
Packit Service |
b1ea74 |
"winposstr:s:0,1,553,211,1353,811\n"
|
|
Packit Service |
b1ea74 |
"compression:i:1\n"
|
|
Packit Service |
b1ea74 |
"keyboardhook:i:2\n"
|
|
Packit Service |
b1ea74 |
"audiocapturemode:i:0\n"
|
|
Packit Service |
b1ea74 |
"videoplaybackmode:i:1\n"
|
|
Packit Service |
b1ea74 |
"connection type:i:7\n"
|
|
Packit Service |
b1ea74 |
"networkautodetect:i:1\n"
|
|
Packit Service |
b1ea74 |
"bandwidthautodetect:i:1\n"
|
|
Packit Service |
b1ea74 |
"displayconnectionbar:i:1\n"
|
|
Packit Service |
b1ea74 |
"enableworkspacereconnect:i:0\n"
|
|
Packit Service |
b1ea74 |
"disable wallpaper:i:0\n"
|
|
Packit Service |
b1ea74 |
"allow font smoothing:i:0\n"
|
|
Packit Service |
b1ea74 |
"allow desktop composition:i:0\n"
|
|
Packit Service |
b1ea74 |
"disable full window drag:i:1\n"
|
|
Packit Service |
b1ea74 |
"disable menu anims:i:1\n"
|
|
Packit Service |
b1ea74 |
"disable themes:i:0\n"
|
|
Packit Service |
b1ea74 |
"disable cursor setting:i:0\n"
|
|
Packit Service |
b1ea74 |
"bitmapcachepersistenable:i:1\n"
|
|
Packit Service |
b1ea74 |
"full address:s:LAB1-W7-DM-01.lab1.awake.local\n"
|
|
Packit Service |
b1ea74 |
"alternate full address:s:LAB1-W7-DM-01.lab1.awake.global\n"
|
|
Packit Service |
b1ea74 |
"audiomode:i:0\n"
|
|
Packit Service |
b1ea74 |
"redirectprinters:i:1\n"
|
|
Packit Service |
b1ea74 |
"redirectcomports:i:0\n"
|
|
Packit Service |
b1ea74 |
"redirectsmartcards:i:1\n"
|
|
Packit Service |
b1ea74 |
"redirectclipboard:i:1\n"
|
|
Packit Service |
b1ea74 |
"redirectposdevices:i:0\n"
|
|
Packit Service |
b1ea74 |
"autoreconnection enabled:i:1\n"
|
|
Packit Service |
b1ea74 |
"authentication level:i:2\n"
|
|
Packit Service |
b1ea74 |
"prompt for credentials:i:0\n"
|
|
Packit Service |
b1ea74 |
"negotiate security layer:i:1\n"
|
|
Packit Service |
b1ea74 |
"remoteapplicationmode:i:0\n"
|
|
Packit Service |
b1ea74 |
"alternate shell:s:\n"
|
|
Packit Service |
b1ea74 |
"shell working directory:s:\n"
|
|
Packit Service |
b1ea74 |
"gatewayhostname:s:LAB1-W2K8R2-GW.lab1.awake.local\n"
|
|
Packit Service |
b1ea74 |
"gatewayusagemethod:i:1\n"
|
|
Packit Service |
b1ea74 |
"gatewaycredentialssource:i:0\n"
|
|
Packit Service |
b1ea74 |
"gatewayprofileusagemethod:i:1\n"
|
|
Packit Service |
b1ea74 |
"promptcredentialonce:i:1\n"
|
|
Packit Service |
b1ea74 |
"use redirection server name:i:0\n"
|
|
Packit Service |
b1ea74 |
"rdgiskdcproxy:i:0\n"
|
|
Packit Service |
b1ea74 |
"kdcproxyname:s:\n"
|
|
Packit Service |
b1ea74 |
"drivestoredirect:s:*\n"
|
|
Packit Service |
b1ea74 |
"username:s:LAB1\\JohnDoe\n"
|
|
Packit Service |
b1ea74 |
"vendor integer:i:123\n"
|
|
Packit Service |
b1ea74 |
"vendor string:s:microsoft\n";
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
static char* append(const char* fmt, ...)
|
|
Packit Service |
b1ea74 |
{
|
|
Packit Service |
b1ea74 |
int rc;
|
|
Packit Service |
b1ea74 |
char* dst;
|
|
Packit Service |
b1ea74 |
va_list ap;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
va_start(ap, fmt);
|
|
Packit Service |
b1ea74 |
rc = vsnprintf(NULL, 0, fmt, ap);
|
|
Packit Service |
b1ea74 |
va_end(ap);
|
|
Packit Service |
b1ea74 |
if (rc < 0)
|
|
Packit Service |
b1ea74 |
return NULL;
|
|
Packit Service |
b1ea74 |
dst = malloc((size_t)rc + 1);
|
|
Packit Service |
b1ea74 |
if (!dst)
|
|
Packit Service |
b1ea74 |
return NULL;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
va_start(ap, fmt);
|
|
Packit Service |
b1ea74 |
rc = vsnprintf(dst, (size_t)rc + 1, fmt, ap);
|
|
Packit Service |
b1ea74 |
va_end(ap);
|
|
Packit Service |
b1ea74 |
if (rc < 0)
|
|
Packit Service |
b1ea74 |
{
|
|
Packit Service |
b1ea74 |
free(dst);
|
|
Packit Service |
b1ea74 |
return NULL;
|
|
Packit Service |
b1ea74 |
}
|
|
Packit Service |
b1ea74 |
return dst;
|
|
Packit Service |
b1ea74 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
int TestClientRdpFile(int argc, char* argv[])
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
int rc = -1;
|
|
Packit Service |
fa4841 |
int iValue;
|
|
Packit Service |
b1ea74 |
const char* sValue;
|
|
Packit Service |
b1ea74 |
char* utfname = NULL;
|
|
Packit Service |
b1ea74 |
char* uniname = NULL;
|
|
Packit Service |
b1ea74 |
char* base = NULL;
|
|
Packit Service |
b1ea74 |
char* tmp = NULL;
|
|
Packit Service |
b1ea74 |
UINT64 id;
|
|
Packit Service |
fa4841 |
rdpFile* file;
|
|
Packit Service |
b1ea74 |
rdpSettings* settings;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
WINPR_UNUSED(argc);
|
|
Packit Service |
b1ea74 |
WINPR_UNUSED(argv);
|
|
Packit Service |
b1ea74 |
winpr_RAND((BYTE*)&id, sizeof(id));
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
fa4841 |
/* Unicode */
|
|
Packit Service |
fa4841 |
file = freerdp_client_rdp_file_new();
|
|
Packit Service |
b1ea74 |
settings = freerdp_settings_new(0);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (!file || !settings)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
printf("rdp_file_new failed\n");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_parse_rdp_file_buffer(file, testRdpFileUTF16, sizeof(testRdpFileUTF16)))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_populate_settings_from_rdp_file(file, settings))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (settings->UseMultimon)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("UseMultiMon mismatch: Actual: %" PRIu32 ", Expected: 0\n", settings->UseMultimon);
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (!settings->Fullscreen)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("ScreenModeId mismatch: Actual: %" PRIu32 ", Expected: TRUE\n",
|
|
Packit Service |
b1ea74 |
settings->Fullscreen);
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
#if 0 /* TODO: Currently unused */
|
|
Packit Service |
b1ea74 |
if (settings->GatewayProfileUsageMethod != 1)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
printf("GatewayProfileUsageMethod mismatch: Actual: %"PRIu32", Expected: 1\n",
|
|
Packit Service |
b1ea74 |
settings->GatewayProfileUsageMethod);
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
b1ea74 |
#endif
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (strcmp(settings->GatewayHostname, "LAB1-W2K8R2-GW.lab1.awake.local") != 0)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("GatewayHostname mismatch: Actual: %s, Expected: %s\n", settings->GatewayHostname,
|
|
Packit Service |
b1ea74 |
"LAB1-W2K8R2-GW.lab1.awake.local");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
}
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (strcmp(settings->ServerHostname, "LAB1-W7-DM-01.lab1.awake.local") != 0)
|
|
Packit Service |
b1ea74 |
{
|
|
Packit Service |
b1ea74 |
printf("ServerHostname mismatch: Actual: %s, Expected: %s\n", settings->ServerHostname,
|
|
Packit Service |
b1ea74 |
"LAB1-W7-DM-01.lab1.awake.local");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
freerdp_client_rdp_file_free(file);
|
|
Packit Service |
b1ea74 |
freerdp_settings_free(settings);
|
|
Packit Service |
fa4841 |
/* Ascii */
|
|
Packit Service |
fa4841 |
file = freerdp_client_rdp_file_new();
|
|
Packit Service |
b1ea74 |
settings = freerdp_settings_new(0);
|
|
Packit Service |
b1ea74 |
if (!file || !settings)
|
|
Packit Service |
b1ea74 |
{
|
|
Packit Service |
b1ea74 |
printf("rdp_file_new failed\n");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
}
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_parse_rdp_file_buffer(file, (BYTE*)testRdpFileUTF8,
|
|
Packit Service |
b1ea74 |
sizeof(testRdpFileUTF8)))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_populate_settings_from_rdp_file(file, settings))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (settings->UseMultimon != 0)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("UseMultiMon mismatch: Actual: %" PRIu32 ", Expected: 0\n", settings->UseMultimon);
|
|
Packit Service |
fa4841 |
return -1;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (!settings->Fullscreen)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("ScreenModeId mismatch: Actual: %" PRIu32 ", Expected: TRUE\n",
|
|
Packit Service |
b1ea74 |
settings->Fullscreen);
|
|
Packit Service |
fa4841 |
return -1;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
#if 0 /* TODO: Currently unused */
|
|
Packit Service |
b1ea74 |
if (settings->GatewayProfileUsageMethod != 1)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
printf("GatewayProfileUsageMethod mismatch: Actual: %"PRIu32", Expected: 1\n",
|
|
Packit Service |
b1ea74 |
settings->GatewayProfileUsageMethod);
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
b1ea74 |
#endif
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
if (strcmp(settings->ServerHostname, "LAB1-W7-DM-01.lab1.awake.global") != 0)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
b1ea74 |
printf("ServerHostname mismatch: Actual: %s, Expected: %s\n", settings->ServerHostname,
|
|
Packit Service |
b1ea74 |
"LAB1-W7-DM-01.lab1.awake.global");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
}
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (strcmp(settings->GatewayHostname, "LAB1-W2K8R2-GW.lab1.awake.local") != 0)
|
|
Packit Service |
b1ea74 |
{
|
|
Packit Service |
b1ea74 |
printf("GatewayHostname mismatch: Actual: %s, Expected: %s\n", settings->GatewayHostname,
|
|
Packit Service |
b1ea74 |
"LAB1-W2K8R2-GW.lab1.awake.local");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
iValue = freerdp_client_rdp_file_get_integer_option(file, "vendor integer");
|
|
Packit Service |
fa4841 |
if (iValue != 123)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
if (freerdp_client_rdp_file_set_integer_option(file, "vendor integer", 456) == -1)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
printf("failed to set integer: vendor integer");
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
iValue = freerdp_client_rdp_file_get_integer_option(file, "vendor integer");
|
|
Packit Service |
fa4841 |
if (iValue != 456)
|
|
Packit Service |
fa4841 |
return -1;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
sValue = freerdp_client_rdp_file_get_string_option(file, "vendor string");
|
|
Packit Service |
fa4841 |
if (strncmp(sValue, "microsoft", 10) != 0)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
freerdp_client_rdp_file_set_string_option(file, "vendor string", "apple");
|
|
Packit Service |
b1ea74 |
sValue = freerdp_client_rdp_file_get_string_option(file, "vendor string");
|
|
Packit Service |
fa4841 |
if (strncmp(sValue, "apple", 6) != 0)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
freerdp_client_rdp_file_set_string_option(file, "fruits", "banana,oranges");
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
if (freerdp_client_rdp_file_set_integer_option(file, "numbers", 123456789) == -1)
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
printf("failed to set integer: numbers");
|
|
Packit Service |
fa4841 |
return -1;
|
|
Packit Service |
fa4841 |
}
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
freerdp_client_rdp_file_free(file);
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
tmp = GetKnownPath(KNOWN_PATH_TEMP);
|
|
Packit Service |
b1ea74 |
if (!tmp)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
base = append("%s/rdp-file-test-%" PRIx64, tmp, id);
|
|
Packit Service |
b1ea74 |
if (!base)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
if (!CreateDirectoryA(base, NULL))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
utfname = append("%s/utfname", base);
|
|
Packit Service |
b1ea74 |
uniname = append("%s/uniname", base);
|
|
Packit Service |
b1ea74 |
file = freerdp_client_rdp_file_new();
|
|
Packit Service |
b1ea74 |
if (!file || !utfname || !uniname)
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_populate_rdp_file_from_settings(file, settings))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_write_rdp_file(file, utfname, FALSE))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (!freerdp_client_write_rdp_file(file, uniname, TRUE))
|
|
Packit Service |
b1ea74 |
goto fail;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
rc = 0;
|
|
Packit Service |
b1ea74 |
fail:
|
|
Packit Service |
b1ea74 |
if (utfname)
|
|
Packit Service |
b1ea74 |
DeleteFileA(utfname);
|
|
Packit Service |
b1ea74 |
if (uniname)
|
|
Packit Service |
b1ea74 |
DeleteFileA(uniname);
|
|
Packit Service |
b1ea74 |
if (base)
|
|
Packit Service |
b1ea74 |
RemoveDirectoryA(base);
|
|
Packit Service |
b1ea74 |
free(utfname);
|
|
Packit Service |
b1ea74 |
free(uniname);
|
|
Packit Service |
b1ea74 |
free(base);
|
|
Packit Service |
b1ea74 |
free(tmp);
|
|
Packit Service |
fa4841 |
freerdp_client_rdp_file_free(file);
|
|
Packit Service |
b1ea74 |
freerdp_settings_free(settings);
|
|
Packit Service |
b1ea74 |
return rc;
|
|
Packit Service |
fa4841 |
}
|