mirror of https://github.com/OpenVPN/openvpn-gui
URL profile import: disable profile download in case of certificate errors
Allow users to bypass HTTPS is not good, but may nevertheless be useful during development. DEBUG macro is widely used in openvpn-gui code but was missing from CMakeLists.txt, so add it there. Signed-off-by: Lev Stipakov <lev@openvpn.net>pull/446/head
parent
e3b06efcd2
commit
82d932a503
|
@ -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
|
||||
|
|
3
as.c
3
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue