Blame client/common/test/TestClientRdpFile.c

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