diff --git a/CMakeLists.txt b/CMakeLists.txt index 1751ec2..75705fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,8 @@ add_executable(${PROJECT_NAME} WIN32 find_package(OpenSSL REQUIRED) +set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") + target_link_libraries(${PROJECT_NAME} OpenSSL::SSL Wtsapi32.lib diff --git a/as.c b/as.c index 0612fcd..eac771b 100644 --- a/as.c +++ b/as.c @@ -336,6 +336,7 @@ again: /* handle cert errors */ /* https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/182888 */ if (!HttpSendRequestW(hRequest, NULL, 0, NULL, 0)) { +#ifdef DEBUG DWORD err = GetLastError(); if ((err == ERROR_INTERNET_INVALID_CA) || (err == ERROR_INTERNET_SEC_CERT_CN_INVALID) || @@ -369,7 +370,7 @@ again: else goto done; } - +#endif ShowWinInetError(hWnd); goto done; }