/** * FreeRDP: A Remote Desktop Protocol Implementation * * Copyright 2015 Thincast Technologies GmbH * Copyright 2015 Armin Novak * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include static int prepare(const char* currentFileV2, const char* legacyFileV2, const char* legacyFile) { char* legacy[] = { "someurl ff:11:22:dd\r\n", "otherurl aa:bb:cc:dd\r", "legacyurl aa:bb:cc:dd\n" }; char* hosts[] = { "someurl 3389 ff:11:22:dd subject issuer\r\n", "otherurl\t3389\taa:bb:cc:dd\tsubject2\tissuer2\r", }; FILE* fl = NULL; FILE* fc = NULL; size_t i; fc = fopen(currentFileV2, "w+"); if (!fc) goto finish; fl = fopen(legacyFileV2, "w+"); if (!fl) goto finish; for (i=0; i