From patchwork Tue Jun 20 13:53:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3254 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp3721974dyk; Tue, 20 Jun 2023 06:54:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KRX5GrHUbYLEuMwneMUhgjjSaycw2srFRB4b+wejENPJlLSIO17kAWFpPP9wNo8Y5ufut X-Received: by 2002:a17:90a:d90b:b0:255:9453:3780 with SMTP id c11-20020a17090ad90b00b0025594533780mr13438112pjv.32.1687269270630; Tue, 20 Jun 2023 06:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687269270; cv=none; d=google.com; s=arc-20160816; b=eJIhThd9NalU9kBLbeT2evratID5oqn4a3xHWYTgxJbziMnGS2SOEaU0wlTHSc/KUR dNijaPODFG984Oudj6EZLDjAcejVT2L6FpJUSES7hWOrgLv6evDEIK7Cy9xSIftUDmcj OsboWeSQR/msVjXLofNJXpxborjRxvmu5O0+nS/Rz0u4utFCR2eptYGD60zV52D2AO/r SHUCwxQSGgyxkpzVA7KPe8dFdfTPfO+PPx4TStnuX724moYik/Xb+um1eO95xjnQezE4 OrGFHN0GNqwcT90T2AjQmwCZaUtn7gaF5xxjGBuSrn+XZlR0+ZylhCYui6xRhM0R6duw 46yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=1KG1OX9RsTCwH84FjA2/xKxIt9bIBN5qr1aIdFV2krA=; b=n+BaVLV7SGVr4MPXGckM4GD89XYqbGLCCok5x1IFtfepjBZjLvoO9mzcRqdCLXpuYU IEdKcL+gPuAMYpEhg4R39i1seNc/FmdMb6pzxDlHSbkUeDc15Dz3JDPuDhuJBF2bTstq x+zO6lqMSNHWHdrNChLxDopLs6cAZR7oCFSuQP2DhGmVlgmnvfm6NtQ5n6wN2HGmJq7Y vvfT7kQGVEHiEqFkMBlEBBe27+bsDXMz9+f+T8lld6Jtk6yMXfCyAYVPfSUPH82UcwQT b9alWklMbabFtiOh5OOOLJIr+04rTm1iLwzjM6qC0CIe+ioKOMlD5xlTo0qKKB/9DbHz g3bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YmQDU0yl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bz9sCB3i; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=WGFVyd01; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id gk9-20020a17090b118900b0023b481b8dcesi9687697pjb.102.2023.06.20.06.54.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 06:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YmQDU0yl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bz9sCB3i; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=WGFVyd01; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qBbnY-0004wy-Ue; Tue, 20 Jun 2023 13:53:32 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qBbnW-0004wf-JQ for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pdLeykugwdQJQTik1ylzh01VGlm7z4ESPFgSX97HjAk=; b=YmQDU0ylq1UAJ9m0ideTsFxoUS 7vNbi7YpiD8/S9tDuk1YU6ed946LiMoZgXoSn3P+Q2eyWoew/CKSdA1gDsGQz4XokWCCkdK6B2aTS E+oz7D/gd/c9PlCVN8l3/4CELafmyGebVVHfaC/SqeFjfQp25pPnQab4MzTSWl4jDd9o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pdLeykugwdQJQTik1ylzh01VGlm7z4ESPFgSX97HjAk=; b=bz9sCB3iSTJd27rTnSnPHSOYAr FA5qI1q3p2LA9HPCLWi2kMFzZq/AHr2u4+mQMCQIKq6yd0MXDdMnkkw0lxrv7byw3oVVjiZ/nUmnd 94CzrjR0MsVzGMkThFzBRQfQwUshZ6iFl3HhqYHv0Dlfc6dLPLZmYs4lGPf2lTKovlSg=; Received: from mout-p-101.mailbox.org ([80.241.56.151]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qBbnP-0001h9-F7 for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:30 +0000 Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Qlp4S5p2Lz9sWv; Tue, 20 Jun 2023 15:53:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1687269192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pdLeykugwdQJQTik1ylzh01VGlm7z4ESPFgSX97HjAk=; b=WGFVyd01IfbAHnuKufhqnDIUoQ6XGyhA0bXVpP/F8IjqkH5ZoTmbS0/aRouUm8j/U0c6K5 n2Kf0HavVNCiHEFd6yqjuU0U7eEyRPfolzuuley+p4nY86YyYC33DeZmWDLeYAGUotbpjv krRgF1k3yM1aZDLq1cPGZyBtYmmBglAMdatW55atB/BR6zPOq1HfIzu4RbuzhrQo9252vu ocFG6lUye6+LBrynE3NjwD+Di8/00lUh2kE55lJ9uhdrjK/EWfEJS/NFTy9ACis22MZRnG 62XRD4hLqy9zZlwthxu7r5bCKIoUmN5TuqACsEhmplsrVpdUvkOmPmgRPJyYsg== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Tue, 20 Jun 2023 15:53:06 +0200 Message-Id: <20230620135310.94455-2-frank@lichtenheld.com> In-Reply-To: <20230620135310.94455-1-frank@lichtenheld.com> References: <20230509111205.138997-1-frank@lichtenheld.com> <20230620135310.94455-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arne Schwabe This helps with IDE integration among other things. This is a basic implementation for development purposes that can't replace any of the existing release builds. Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qBbnP-0001h9-F7 Subject: [Openvpn-devel] [PATCH 1/5] add basic CMake based build X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1765414836883125177?= X-GMAIL-MSGID: =?utf-8?q?1769230062752316493?= From: Arne Schwabe This helps with IDE integration among other things. This is a basic implementation for development purposes that can't replace any of the existing release builds. Change-Id: I666314a223d324ca72dbe7ba7d22f764996d3ca2 Signed-off-by: Arne Schwabe Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- CMakeLists.txt | 591 ++++++++++++++++++++++++++++++++++++++++++++++ config.h.cmake.in | 492 ++++++++++++++++++++++++++++++++++++++ src/openvpn/lzo.h | 9 +- 3 files changed, 1091 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt create mode 100644 config.h.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..9978ea40 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,591 @@ + cmake_minimum_required(VERSION 3.3) +project(openvpn) + +# This CMake file implements building OpenVPN with CMAKE +# +# Note that this is *NOT* the official way to build openvpn on anything +# other than Windows/mingw despite working on other platforms too. You will need +# to add -DUNSUPPORTED_BUILDS=true to build on non Windows platforms. +# +# This cmake also makes a few assertions like lzo, lz4 being used +# and OpenSSL having version 1.1.1+ and generally does not offer the same +# configurability like autoconf + +# -DCMAKE_TOOLCHAIN_FILE=C:/Users/User/source/repos/vcpkg/scripts/buildsystems/vcpkg.cmake +#-DVCPKG_OVERLAY_PORTS=C:/Users/User/source/repos/openvpn/contrib/vcpkg-ports +#-GNinja + +option(UNSUPPORTED_BUILDS "Allow unsupported builds" OFF) + +if (NOT WIN32 AND NOT ${UNSUPPORTED_BUILDS}) + message(FATAL_ERROR "Note: on Unix platform the official and supported build method is using autoconfig. CMake based build should be only used for Windows and internal testing/development.") +endif() + +option(MBED "BUILD with mbed" OFF) +option(WOLFSSL "BUILD with wolfSSL" OFF) +if (MSVC) + option(USE_WERROR "Treat compiler warnings as errors (-Werror)" OFF) +else () + option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +endif () +option(PLUGIN_DIR "Location of the plugin directory" /usr/local/lib/openvpn/plugins) + +# AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to build with ASAN +set(CMAKE_C_FLAGS_ASAN + "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + CACHE STRING "Flags used by the C compiler during AddressSanitizer builds." + FORCE) +set(CMAKE_CXX_FLAGS_ASAN + "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + CACHE STRING "Flags used by the C++ compiler during AddressSanitizer builds." + FORCE) + +if (MSVC) + target_compile_options(${target} PRIVATE /W3) +else () + add_compile_options(-Wall -Wuninitialized) + # We are not ready for this + #add_compile_options(-Wsign-compare) +endif () + +find_package(PkgConfig) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckTypeSize) +INCLUDE(CheckStructHasMember) + +set(OPENVPN_VERSION_MAJOR 2) +set(OPENVPN_VERSION_MINOR 6) +set(OPENVPN_VERSION_PATCH _git) + +if (NOT WIN32) + add_definitions(-DPLUGIN_LIBDIR=\"${PLUGIN_DIR}\") +endif () + +# TODO remove later when msvc-config.h is removed and we can always include config.h +add_definitions(-DHAVE_CONFIG_H) + + +# Set the various defines for config.h.cmake.in +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(TARGET_LINUX YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_LINUXDCO YES) + set(ENABLE_SITNL YES) + set(HAVE_DECL_SO_MARK YES) + set(ENABLE_FEATURE_TUN_PERSIST 1) + set(HAVE_LINUX_TYPES_H 1) + set(ENABLE_DCO YES) + set(HAVE_CMSGHDR YES) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + set(TARGET_FREEBSD YES) + set(ENABLE_DCO YES) + link_libraries(-lnv) +elseif (WIN32) + set(ENABLE_DCO YES) +elseif (APPLE) + set(TARGET_DARWIN YES) + set(HAVE_NET_IF_UTUN_H YES) +endif () + +if (UNIX) + set(PATH_SEPARATOR /) + set(ENABLE_PORT_SHARE YES) + set(HAVE_SA_FAMILY_T YES) +elseif (WIN32) + set(PATH_SEPARATOR \\\\) + set(TARGET_WIN32 YES) +endif () + +CHECK_SYMBOL_EXISTS(chroot unistd.h HAVE_CHROOT) +CHECK_SYMBOL_EXISTS(chdir unistd.h HAVE_CHDIR) +CHECK_SYMBOL_EXISTS(dup unistd.h HAVE_DUP) +CHECK_SYMBOL_EXISTS(dup2 unistd.h HAVE_DUP2) +CHECK_SYMBOL_EXISTS(fork unistd.h HAVE_FORK) +CHECK_SYMBOL_EXISTS(execve unistd.h HAVE_EXECVE) +CHECK_SYMBOL_EXISTS(ftruncate unistd.h HAVE_FTRUNCATE) +CHECK_SYMBOL_EXISTS(setgid unistd.h HAVE_SETGID) +CHECK_SYMBOL_EXISTS(setuid unistd.h HAVE_SETUID) +CHECK_SYMBOL_EXISTS(getpeereid unistd.h HAVE_GETPEEREID) + +CHECK_SYMBOL_EXISTS(epoll_create sys/epoll.h HAVE_EPOLL_CREATE) + +CHECK_SYMBOL_EXISTS(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) +CHECK_SYMBOL_EXISTS(basename libgen.h HAVE_BASENAME) +CHECK_SYMBOL_EXISTS(chsize io.h HAVE_CHSIZE) +CHECK_SYMBOL_EXISTS(daemon stdlib.h HAVE_DAEMON) +CHECK_SYMBOL_EXISTS(dirname libgen.h HAVE_DIRNAME) +CHECK_SYMBOL_EXISTS(getrlimit sys/resource.h HAVE_GETRLIMIT) +CHECK_SYMBOL_EXISTS(mlockall sys/mman.h HAVE_MLOCKALL) + +CHECK_SYMBOL_EXISTS(sendmsg sys/socket.h HAVE_SENDMSG) +CHECK_SYMBOL_EXISTS(recvmsg sys/socket.h HAVE_RECVMSG) +CHECK_SYMBOL_EXISTS(cmsghdr sys/socket.h HAVE_CMSGHDR) +CHECK_SYMBOL_EXISTS(openlog syslog.h HAVE_OPENLOG) +CHECK_SYMBOL_EXISTS(syslog syslog.h HAVE_SYSLOG) +CHECK_SYMBOL_EXISTS(getgrnam grp.h HAVE_GETGRNAM) +CHECK_SYMBOL_EXISTS(getpwnam pwd.h HAVE_GETPWNAM) +CHECK_SYMBOL_EXISTS(getsockname sys/socket.h HAVE_GETSOCKNAME) + +# Some OS (e.g. FreeBSD) need some basic headers to allow +# including network headers +SET(NETEXTRA sys/types.h) +CHECK_INCLUDE_FILES("${NETEXTRA};netinet/in.h" HAVE_NETINET_IN_H) + +if (HAVE_NETINET_IN_H) + LIST(APPEND NETEXTRA netinet/in.h) +endif () + +CHECK_INCLUDE_FILES("${NETEXTRA};netinet/in6.h" HAVE_NETINET_IN_H) +CHECK_INCLUDE_FILES(linux/if_tun.h HAVE_LINUX_IF_TUN_H) +CHECK_INCLUDE_FILES(linux/sockios.h HAVE_LINUX_SOCKIOS_H) +CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H) +CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H) +CHECK_INCLUDE_FILES(dmalloc.h HAVE_DMALLOC_H) +CHECK_INCLUDE_FILES(err.h HAVE_ERR_H) +CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H) +CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H) +CHECK_INCLUDE_FILES(sys/socket.h HAVE_SYS_SOCKET_H) +CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H) +CHECK_INCLUDE_FILES(netdb.h HAVE_NETDB_H) +CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H) +CHECK_INCLUDE_FILES(sys/un.h HAVE_SYS_UN_H) +CHECK_INCLUDE_FILES(libgen.h HAVE_LIBGEN_H) +CHECK_INCLUDE_FILES(net/if.h HAVE_NET_IF_H) +CHECK_INCLUDE_FILES("${NETEXTRA};netinet/ip.h" HAVE_NETINET_IP_H) +CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H) +CHECK_INCLUDE_FILES(net/if_utun.h HAVE_NET_UTUN_H) +CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H) +CHECK_INCLUDE_FILES(sys/inotify.h HAVE_SYS_INOTIFY_H) +CHECK_INCLUDE_FILES("${NETEXTRA};sys/uio.h" HAVE_SYS_UIO_H) +CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H) +CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H) +CHECK_INCLUDE_FILES(grp.h HAVE_GRP_H) +CHECK_INCLUDE_FILES(pwd.h HAVE_PWD_H) +CHECK_INCLUDE_FILES(sys/mman.h HAVE_SYS_MMAN_H) + + +CHECK_INCLUDE_FILES("${NETEXTRA};resolv.h" HAVE_RESOLV_H) +CHECK_INCLUDE_FILES("${NETEXTRA};net/if_tun.h" HAVE_NET_IF_TUN_H) + +# Is this obscure header needed anywhere?! +CHECK_INCLUDE_FILES(netinet/in_systm.h HAVE_NETINET_IN_SYSTM_H) + + +SET(CMAKE_EXTRA_INCLUDE_FILES netinet/ip.h) +CHECK_TYPE_SIZE("struct in_pktinfo" IN_PKTINFO) +CHECK_STRUCT_HAS_MEMBER("struct in_pktinfo" ipi_spec_dst netinet/ip.h HAVE_IPI_SPEC_DST) +CHECK_TYPE_SIZE("struct msghdr" MSGHDR) +SET(CMAKE_EXTRA_INCLUDE_FILES) + +find_program(IFCONFIG_PATH ifconfig) +find_program(IPROUTE_PATH ip) +find_program(ROUTE_PATH route) + + +if (NOT WIN32) + set(ENABLE_LZ4 YES) + set(ENABLE_LZO YES) +endif () + +function(add_library_deps target) + if (${MBED}) + target_include_directories(${target} PRIVATE $ENV{HOME}/oss/mbedtls2/include) + message("Building ${target} for mbed TLS") + target_link_libraries(${target} PUBLIC -L$ENV{HOME}/oss/mbedtls2/library -L/usr/local/opt/lzo/lib -lmbedtls -lmbedx509 -lmbedcrypto) + elseif (${WOLFSSL}) + pkg_search_module(wolfssl wolfssl REQUIRED) + target_link_libraries(${target} PUBLIC ${wolfssl_LINK_LIBRARIES}) + target_include_directories(${target} PRIVATE ${wolfssl_INCLUDE_DIRS}/wolfssl) + message("Building ${target} for WolfSSL: ${wolfssl_LINK_LIBRARIES} ${wolfssl_INCLUDE_DIRS}/wolfsll") + else () + set(ENABLE_X509ALTUSERNAME YES) + + find_package(OpenSSL REQUIRED) + target_link_libraries(${target} PUBLIC OpenSSL::SSL) + + message("Building ${target} for default OpenSSL") + endif () + + + if (${ENABLE_LZ4}) + pkg_search_module(liblz4 liblz4 REQUIRED IMPORTED_TARGET) + target_link_libraries(${target} PUBLIC PkgConfig::liblz4) + endif () + + if (${ENABLE_LZO}) + pkg_search_module(lzo2 lzo2 REQUIRED IMPORTED_TARGET) + target_link_libraries(${target} PUBLIC PkgConfig::lzo2) + endif () + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_include_directories(${target} PUBLIC ${LIBNL_INCLUDE_DIRS}) + target_link_libraries(${target} PUBLIC ${LIBNL_LIBRARIES}) + endif () + + if (USE_WERROR) + if (MSVC) + target_compile_options(${target} PRIVATE /WX) + else () + target_compile_options(${target} PRIVATE -Werror) + endif () + endif () +endfunction() + +if (${MBED}) + set(ENABLE_CRYPTO_MBEDTLS YES) +elseif (${WOLFSSL}) + set(ENABLE_CRYPTO_OPENSSL YES) + set(ENABLE_CRYPTO_WOLFSSL YES) + set(ENABLE_X509ALTUSERNAME YES) +else () + set(ENABLE_CRYPTO_OPENSSL YES) + set(ENABLE_X509ALTUSERNAME YES) +endif () + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} src/compat include) + +if (WIN32) + find_package(OpenSSL REQUIRED) + + link_libraries(OpenSSL::SSL OpenSSL::Crypto ws2_32.lib Crypt32.lib fwpuclnt.lib iphlpapi.lib + wininet.lib setupapi.lib rpcrt4.lib wtsapi32.lib Ncrypt.lib) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D _WINSOCK_DEPRECATED_NO_WARNINGS -D_CONSOLE) +endif () + +configure_file(config.h.cmake.in config.h) +configure_file(include/openvpn-plugin.h.in openvpn-plugin.h) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +set(SOURCE_FILES + ${CMAKE_CURRENT_BINARY_DIR}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/openvpn-plugin.h + + src/compat/compat-basename.c + src/compat/compat-daemon.c + src/compat/compat-dirname.c + src/compat/compat-gettimeofday.c + src/compat/compat-strsep.c + src/compat/compat-versionhelpers.h + src/openvpn/argv.c + src/openvpn/argv.h + src/openvpn/base64.c + src/openvpn/base64.h + src/openvpn/basic.h + src/openvpn/block_dns.h + src/openvpn/block_dns.c + src/openvpn/buffer.c + src/openvpn/buffer.h + src/openvpn/circ_list.h + src/openvpn/clinat.c + src/openvpn/clinat.h + src/openvpn/common.h + src/openvpn/comp-lz4.c + src/openvpn/comp-lz4.h + src/openvpn/comp.c + src/openvpn/comp.h + src/openvpn/compstub.c + src/openvpn/console.c + src/openvpn/console_builtin.c + src/openvpn/console.h + src/openvpn/crypto.c + src/openvpn/crypto.h + src/openvpn/crypto_backend.h + src/openvpn/crypto_openssl.c + src/openvpn/crypto_openssl.h + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_mbedtls.h + src/openvpn/cryptoapi.c + src/openvpn/cryptoapi.h + src/openvpn/dco.c + src/openvpn/dco.h + src/openvpn/dco_win.c + src/openvpn/dco_win.h + src/openvpn/dco_linux.c + src/openvpn/dco_linux.h + src/openvpn/dco_freebsd.c + src/openvpn/dco_freebsd.h + src/openvpn/dhcp.c + src/openvpn/dhcp.h + src/openvpn/dns.c + src/openvpn/dns.h + src/openvpn/errlevel.h + src/openvpn/env_set.c + src/openvpn/env_set.h + src/openvpn/error.c + src/openvpn/error.h + src/openvpn/event.c + src/openvpn/event.h + src/openvpn/fdmisc.c + src/openvpn/fdmisc.h + src/openvpn/forward.c + src/openvpn/forward.h + src/openvpn/fragment.c + src/openvpn/fragment.h + src/openvpn/gremlin.c + src/openvpn/gremlin.h + src/openvpn/helper.c + src/openvpn/helper.h + src/openvpn/httpdigest.c + src/openvpn/httpdigest.h + src/openvpn/init.c + src/openvpn/init.h + src/openvpn/integer.h + src/openvpn/interval.c + src/openvpn/interval.h + src/openvpn/list.c + src/openvpn/list.h + src/openvpn/lladdr.c + src/openvpn/lladdr.h + src/openvpn/lzo.c + src/openvpn/lzo.h + src/openvpn/manage.c + src/openvpn/manage.h + src/openvpn/mbuf.c + src/openvpn/mbuf.h + src/openvpn/memdbg.h + src/openvpn/misc.c + src/openvpn/misc.h + src/openvpn/mroute.c + src/openvpn/mroute.h + src/openvpn/mss.c + src/openvpn/mss.h + src/openvpn/mstats.c + src/openvpn/mstats.h + src/openvpn/mtcp.c + src/openvpn/mtcp.h + src/openvpn/mtu.c + src/openvpn/mtu.h + src/openvpn/mudp.c + src/openvpn/mudp.h + src/openvpn/multi.c + src/openvpn/multi.h + src/openvpn/ntlm.c + src/openvpn/ntlm.h + src/openvpn/occ.c + src/openvpn/occ.h + src/openvpn/openvpn.c + src/openvpn/openvpn.h + src/openvpn/options.c + src/openvpn/options.h + src/openvpn/options_util.c + src/openvpn/options_util.h + src/openvpn/otime.c + src/openvpn/otime.h + src/openvpn/ovpn_dco_win.h + src/openvpn/packet_id.c + src/openvpn/packet_id.h + src/openvpn/perf.c + src/openvpn/perf.h + src/openvpn/ping.c + src/openvpn/ping.h + src/openvpn/pkcs11.c + src/openvpn/pkcs11.h + src/openvpn/pkcs11_backend.h + src/openvpn/pkcs11_openssl.c + src/openvpn/pkcs11_mbedtls.c + src/openvpn/platform.c + src/openvpn/platform.h + src/openvpn/plugin.c + src/openvpn/plugin.h + src/openvpn/pool.c + src/openvpn/pool.h + src/openvpn/proto.c + src/openvpn/proto.h + src/openvpn/proxy.c + src/openvpn/proxy.h + src/openvpn/ps.c + src/openvpn/ps.h + src/openvpn/push.c + src/openvpn/push.h + src/openvpn/pushlist.h + src/openvpn/reliable.c + src/openvpn/reliable.h + src/openvpn/route.c + src/openvpn/route.h + src/openvpn/run_command.c + src/openvpn/run_command.h + src/openvpn/schedule.c + src/openvpn/schedule.h + src/openvpn/session_id.c + src/openvpn/session_id.h + src/openvpn/shaper.c + src/openvpn/shaper.h + src/openvpn/sig.c + src/openvpn/sig.h + src/openvpn/socket.c + src/openvpn/socket.h + src/openvpn/socks.c + src/openvpn/socks.h + src/openvpn/ssl.c + src/openvpn/ssl.h + src/openvpn/ssl_backend.h + src/openvpn/ssl_common.h + src/openvpn/ssl_openssl.c + src/openvpn/ssl_openssl.h + src/openvpn/ssl_mbedtls.c + src/openvpn/ssl_mbedtls.h + src/openvpn/ssl_verify.c + src/openvpn/ssl_verify.h + src/openvpn/ssl_verify_backend.h + src/openvpn/ssl_verify_openssl.c + src/openvpn/ssl_verify_openssl.h + src/openvpn/ssl_verify_mbedtls.c + src/openvpn/ssl_verify_mbedtls.h + src/openvpn/status.c + src/openvpn/status.h + src/openvpn/syshead.h + src/openvpn/tls_crypt.c + src/openvpn/tun.c + src/openvpn/tun.h + src/openvpn/networking_sitnl.c + src/openvpn/networking_freebsd.c + src/openvpn/auth_token.c + src/openvpn/auth_token.h + src/openvpn/ssl_ncp.c + src/openvpn/ssl_ncp.h + src/openvpn/ssl_pkt.c + src/openvpn/ssl_pkt.h + src/openvpn/ssl_util.c + src/openvpn/ssl_util.h + src/openvpn/vlan.c + src/openvpn/vlan.h + src/openvpn/win32.c + src/openvpn/win32-util.c + src/openvpn/win32.h + src/openvpn/win32-util.h + src/openvpn/xkey_helper.c + src/openvpn/xkey_provider.c + ) + +add_executable(openvpn ${SOURCE_FILES}) + +add_library_deps(openvpn) + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(openvpn PUBLIC -ldl) + + find_package(PkgConfig) + pkg_search_module(LIBNL REQUIRED libnl-genl-3.0) + + target_link_libraries(openvpn PUBLIC ${LIBNL_LIBRARIES}) + target_include_directories(openvpn PRIVATE ${LIBNL_INCLUDE_DIRS}) +endif () + + +if (MINGW) + target_link_options(openvpn PRIVATE -municode) +endif () + +if (NOT WIN32) + find_library(resolv resolv) + # some platform like BSDs already include resolver functionality in the libc and not have an extra resolv library + if (${resolv} OR APPLE) + target_link_libraries(openvpn PUBLIC -lresolv) + endif () +endif () + + +pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET) +enable_testing() + +SET(unit_tests "test_packet_id" "test_crypto" "test_ncp" "test_auth_token" "test_misc" "test_buffer" "test_provider" "test_pkt") + +# These tests work on only on Linux since they depend on special linker features +if (WIN32) + LIST(APPEND unit_tests "test_cryptoapi") +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + LIST(APPEND unit_tests "test_networking" "test_tls_crypt" "test_argv") +endif () + + +FOREACH (test_name ${unit_tests}) + add_executable(${test_name} + tests/unit_tests/openvpn/${test_name}.c + tests/unit_tests/openvpn/mock_msg.c + src/openvpn/platform.c + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/otime.c + src/openvpn/packet_id.c + src/openvpn/base64.c + src/openvpn/win32-util.c + src/openvpn/mtu.c + src/openvpn/networking_sitnl.c + src/compat/compat-strsep.c + src/compat/compat-gettimeofday.c + src/openvpn/ssl_util.c + src/openvpn/reliable.c + src/openvpn/session_id.c + src/openvpn/mss.c + src/openvpn/xkey_provider.c + ) + + add_library_deps(${test_name}) + target_link_libraries(${test_name} PUBLIC PkgConfig::cmocka) + + target_include_directories(${test_name} PRIVATE src/openvpn) + + if (NOT ${test_name} STREQUAL "test_buffer") + target_sources(${test_name} PRIVATE + src/openvpn/buffer.c + ) + endif () + add_test(NAME ${test_name} COMMAND ${test_name}) +ENDFOREACH () + +target_sources(test_pkt PRIVATE + src/openvpn/argv.c + src/openvpn/env_set.c + src/openvpn/reliable.c + src/openvpn/run_command.c + src/openvpn/session_id.c + src/openvpn/ssl_pkt.c + src/openvpn/tls_crypt.c + ) + +if (TARGET test_cryptoapi) + target_sources(test_cryptoapi PRIVATE + src/openvpn/xkey_helper.c + src/openvpn/xkey_provider.c + ) +endif () + +target_sources(test_provider PRIVATE + src/openvpn/xkey_provider.c + src/openvpn/xkey_helper.c + ) + +target_sources(test_misc PRIVATE + src/openvpn/options_util.c + ) + +IF (TARGET test_tls_crypt) + target_sources(test_tls_crypt PRIVATE + src/openvpn/argv.c + src/openvpn/env_set.c + src/openvpn/run_command.c) +endif () + +if (TARGET test_argv) + target_sources(test_argv PRIVATE + src/openvpn/argv.c + src/openvpn/env_set.c + src/openvpn/run_command.c) +endif () + + +FOREACH (test_name "networking" "tls_crypt" "argv") + if (TARGET test_${test_name}) + target_link_options(test_${test_name} PRIVATE -Wl,--wrap=parse_line) + endif () +ENDFOREACH () + +if (TARGET test_tls_crypt) + target_link_options("test_tls_crypt" PRIVATE + -Wl,--wrap=buffer_read_from_file + -Wl,--wrap=buffer_write_file + -Wl,--wrap=rand_bytes) +ENDIF () \ No newline at end of file diff --git a/config.h.cmake.in b/config.h.cmake.in new file mode 100644 index 00000000..61859716 --- /dev/null +++ b/config.h.cmake.in @@ -0,0 +1,492 @@ + +/* Configuration settings */ +#define CONFIGURE_DEFINES "N/A" + +/* Enable async push */ +#cmakedefine ENABLE_ASYNC_PUSH + +/* Use mbed TLS library */ +#cmakedefine ENABLE_CRYPTO_MBEDTLS + +/* Use Openssl */ +#cmakedefine ENABLE_CRYPTO_OPENSSL + +/* Use wolfSSL crypto library */ +#cmakedefine ENABLE_CRYPTO_WOLFSSL + +/* Enable shared data channel offload */ +#cmakedefine ENABLE_DCO + +/* Enable debugging support (needed for verb>=4) */ +#define ENABLE_DEBUG 1 + +/* We have persist tun capability */ +#cmakedefine ENABLE_FEATURE_TUN_PERSIST + +/* Enable internal fragmentation support */ +#define ENABLE_FRAGMENT 1 + +/* Enable linux data channel offload */ +#cmakedefine ENABLE_LINUXDCO + +/* Enable LZ4 compression library */ +#cmakedefine ENABLE_LZ4 + +/* Enable LZO compression library */ +#cmakedefine ENABLE_LZO + +/* Enable management server capability */ +#define ENABLE_MANAGEMENT 1 + +/* Enable OFB and CFB cipher modes */ +#define ENABLE_OFB_CFB_MODE + +/* Enable PKCS11 */ +/* #undef ENABLE_PKCS11 */ + +/* Enable plug-in support */ +#define ENABLE_PLUGIN 1 + +/* Enable TCP Server port sharing */ +#cmakedefine ENABLE_PORT_SHARE + +/* SELinux support */ +#cmakedefine ENABLE_SELINUX + +/* enable sitnl support */ +#cmakedefine ENABLE_SITNL + +/* Enable systemd integration */ +/* #undef ENABLE_SYSTEMD */ + +/* Enable --x509-username-field feature */ +#cmakedefine ENABLE_X509ALTUSERNAME + +/* Compiler supports anonymous unions */ +#define HAVE_ANONYMOUS_UNION_SUPPORT + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `basename' function. */ +#cmakedefine HAVE_BASENAME + +/* Define to 1 if you have the `chdir' function. */ +#cmakedefine HAVE_CHDIR + +/* Define to 1 if you have the `chroot' function. */ +#cmakedefine HAVE_CHROOT + +/* Define to 1 if you have the `chsize' function. */ +#cmakedefine HAVE_CHSIZE + +/* struct cmsghdr needed for extended socket error support */ +#cmakedefine HAVE_CMSGHDR + +/* Define to 1 if you have the `daemon' function. */ +#cmakedefine HAVE_DAEMON + +/* Define to 1 if you have the declaration of `SO_MARK', and to 0 if you +don't. */ +#cmakedefine01 HAVE_DECL_SO_MARK + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DIRECT_H + +/* Define to 1 if you have the `dirname' function. */ +#cmakedefine HAVE_DIRNAME + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DMALLOC_H + +/* Define to 1 if you have the `dup' function. */ +#cmakedefine HAVE_DUP + +/* Define to 1 if you have the `dup2' function. */ +#cmakedefine HAVE_DUP2 + +/* Define to 1 if you have the `epoll_create' function. */ +#cmakedefine HAVE_EPOLL_CREATE + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ERR_H + +/* Crypto library supports keying material exporter */ +#define HAVE_EXPORT_KEYING_MATERIAL 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FCNTL_H + +/* Define to 1 if you have the `fork' function. */ +#cmakedefine HAVE_FORK +#cmakedefine HAVE_EXECVE + +/* Define to 1 if you have the `ftruncate' function. */ +#cmakedefine HAVE_FTRUNCATE + +/* Define to 1 if you have the `getgrnam' function. */ +#cmakedefine HAVE_GETGRNAM + +/* Define to 1 if you have the `getpeereid' function. */ +#cmakedefine HAVE_GETPEEREID + +/* Define to 1 if you have the `getpwnam' function. */ +#cmakedefine HAVE_GETPWNAM + +/* Define to 1 if you have the `getrlimit' function. */ +#undef HAVE_GETRLIMIT + +/* Define to 1 if you have the `getsockname' function. */ +#cmakedefine HAVE_GETSOCKNAME + +/* Define to 1 if you have the `gettimeofday' function. */ +#cmakedefine HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GRP_H + +/* struct in_pktinfo needed for IP_PKTINFO support */ +#cmakedefine HAVE_IN_PKTINFO + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_IO_H + +/* struct in_pktinfo.ipi_spec_dst needed for IP_PKTINFO support */ +#cmakedefine HAVE_IPI_SPEC_DST + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIBGEN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_IF_TUN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_SOCKIOS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_TYPES_H + +/* Define to 1 if you have the header file. */ +#define HAVE_LZO_CONF_H + +/* Define to 1 if you have the header file. */ +#define HAVE_LZO1X_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LZOUTIL_H 1 + +/* Define to 1 if you have the `mlockall' function. */ +#cmakedefine HAVE_MLOCKALL + +/* struct msghdr needed for extended socket error support */ +#cmakedefine HAVE_MSGHDR + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_SYSTM_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET_IP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NET_IF_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NET_IF_TUN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine01 HAVE_NET_IF_UTUN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NET_TUN_IF_TUN_H + +/* Define to 1 if you have the `nice' function. */ +#undef HAVE_NICE + +/* Define to 1 if you have the `openlog' function. */ +#undef HAVE_OPENLOG + +/* OpenSSL engine support available */ +#undef HAVE_OPENSSL_ENGINE + +/* Define to 1 if you have the `poll' function. */ +#undef HAVE_POLL + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_POLL_H + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_PWD_H + +/* Define to 1 if you have the `readv' function. */ +#undef HAVE_READV + +/* Define to 1 if you have the `recvmsg' function. */ +#cmakedefine HAVE_RECVMSG +#cmakedefine HAVE_SENDMSG + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_RESOLV_H + +/* sa_family_t, needed to hold AF_* info */ +#cmakedefine HAVE_SA_FAMILY_T + +/* Define to 1 if you have the `sd_booted' function. */ +#undef HAVE_SD_BOOTED + +/* Define to 1 if you have the `setgid' function. */ +#cmakedefine HAVE_SETGID + +/* Define to 1 if you have the `setgroups' function. */ +#undef HAVE_SETGROUPS + +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + +/* Define to 1 if you have the `setsockopt' function. */ +#define HAVE_SETSOCKOPT 1 + +/* Define to 1 if you have the `setuid' function. */ +#cmakedefine HAVE_SETUID + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* struct sock_extended_err needed for extended socket error support */ +#undef HAVE_SOCK_EXTENDED_ERR + +/* Define to 1 if you have the `stat' function. */ +#define HAVE_STAT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP + +/* Define to 1 if you have the `syslog' function. */ +#undef HAVE_SYSLOG + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYSLOG_H + +/* Define to 1 if you have the `system' function. */ +#undef HAVE_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSTEMD_SD_DAEMON_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_EPOLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_INOTIFY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_KERN_CONTROL_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_MMAN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_UN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TAP_WINDOWS_H + +/* Define to 1 if you have the `time' function. */ +#define HAVE_TIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_UAPI_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_VALGRIND_MEMCHECK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_VERSIONHELPERS_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* we always assume a recent mbed TLS version */ +#define HAVE_CTR_DRBG_UPDATE_RET 1 + +/* Path to ifconfig tool */ +#define IFCONFIG_PATH "@IFCONFIG_PATH@" + +/* Path to iproute tool */ +#define IPROUTE_PATH "@IPROUTE_PATH@" + +/* Path to route tool */ +#define ROUTE_PATH "@ROUTE_PATH@" + +/* OpenVPN major version - integer */ +#undef OPENVPN_VERSION_MAJOR + +/* OpenVPN minor version - integer */ +#undef OPENVPN_VERSION_MINOR + +/* OpenVPN patch level - may be a string or integer */ +#define OPENVPN_VERSION_PATCH "@OPENVPN_VERSION_PATCH@" + +/* Name of package */ +#define PACKAGE "openvpn" + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "OpenVPN" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "OpenVPN @OPENVPN_VERSION_MAJOR@.@OPENVPN_VERSION_MINOR@@OPENVPN_VERSION_PATCH@" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@OPENVPN_VERSION_MAJOR@.@OPENVPN_VERSION_MINOR@@OPENVPN_VERSION_PATCH@" + +/* OpenVPN major version - integer */ +#define OPENVPN_VERSION_MAJOR @OPENVPN_VERSION_MAJOR@ + +/* OpenVPN minor version - integer */ +#define OPENVPN_VERSION_MINOR @OPENVPN_VERSION_MINOR@ + +/* Path to systemd-ask-password tool */ +#undef SYSTEMD_ASK_PASSWORD_PATH + +/* systemd is newer than v216 */ +#define SYSTEMD_NEWER_THAN_216 + +/* The tap-windows id */ +#define TAP_WIN_COMPONENT_ID "tap0901" + +/* The tap-windows version number is required for OpenVPN */ +#define TAP_WIN_MIN_MAJOR 9 + +/* The tap-windows version number is required for OpenVPN */ +#define TAP_WIN_MIN_MINOR 9 + +/* Are we running on Mac OS X? */ +#cmakedefine TARGET_DARWIN + +/* Are we running on FreeBSD? */ +#cmakedefine TARGET_FREEBSD + +/* Are we running on Linux? */ +#cmakedefine TARGET_LINUX + +/* Are we running WIN32? */ +#cmakedefine TARGET_WIN32 + +#define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + + +#if defined(_WIN32) +#include +typedef uint32_t in_addr_t; +typedef uint16_t in_port_t; + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGUSR1 10 +#define SIGUSR2 12 +#define SIGTERM 15 +#endif + +#if defined(_MSC_VER) +#include +typedef SSIZE_T ssize_t; +#define strncasecmp strnicmp +#define strcasecmp _stricmp + + +#define S_IRUSR 0 +#define S_IWUSR 0 +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 +#endif + diff --git a/src/openvpn/lzo.h b/src/openvpn/lzo.h index c5723546..f05c0025 100644 --- a/src/openvpn/lzo.h +++ b/src/openvpn/lzo.h @@ -37,7 +37,14 @@ * @addtogroup compression * @{ */ - +#if defined(HAVE_LZO_CONF_H) +/* The lzo.h magic gets confused and still wants + * to include lzo/lzoconf.h even if our include paths + * are setup to include the paths without lzo/ include lzoconf.h to + * avoid it being include by lzoutil.h */ +#include +#include +#endif #if defined(HAVE_LZO_LZOUTIL_H) #include #elif defined(HAVE_LZOUTIL_H) From patchwork Tue Jun 20 13:53:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3253 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp3721959dyk; Tue, 20 Jun 2023 06:54:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fZ6+Hn7/VhGq/kLbbGX9WyDgCImPJa5l/+bQC6oRCCBUO3OBbt5kRNU0xlqWVzFMkvVxt X-Received: by 2002:a17:902:d2c8:b0:1a9:bc13:7e20 with SMTP id n8-20020a170902d2c800b001a9bc137e20mr8508598plc.44.1687269269059; Tue, 20 Jun 2023 06:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687269269; cv=none; d=google.com; s=arc-20160816; b=YmZl0FKOADX68GHw3HPt2We5poFCTWdvmQrVpshmAbkYIXNEuDGvfoPXeLeXOl/+Kk PSCv6zQXADKSEJHiyOJELRnSdLob5VfOTewS/eKnH0fukKTY0PEBbMYJNW2esgi+Z9c4 b19UKPfrlNwm9Un2cv0VJw9AfLE9g+g4kSAmuep/jSaX1XIQMMdQ+f4AC8kKgn5sgbNQ EN/ypqhNw79Tcc6H0EdyhP1dcRBUWciKSKpmUd4aoVjaPRb/4tC2+V8o2vPxLpMhKtHP Ils1jwFhnoC+Yy5UJ5KFJZMPY0JtDQs/s4pgVGiKvkXbdNT8oolYxFmu6j1pVTddXhIW OEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=RuzkHBU5y2o4UDTuMF4MqSmSOKf/PooXo/097LUz5I0=; b=a7LN2be4t1ALkI2Bz0pDh6cBETwuOl+RtJ39O03H0AtvbhzH4iDCtvpEdpHJ4u7p7a Joio/FV4tO2/2I5Wi0d49gloB+FHRAmk5oddZRn34tRN2vP7y0apkppe1mJ0BbO2bOvg 2ajH2DAiPyAx3jxjgT9FvYFXijdtX982VtyvwUOcevS436/jzIYLQOaQin7H4qOob3xc 7R/iOF4kei7R2qf3mjwbLSr6VUNVdM38dBEaO9C1YvmsAAtuKgZNrngiwZWhaZ4S+wqO gfcmqrs+jAWyI0ZCqPTUavzsucNlkJuXtIA6F/IDKD/+Aub3uGOCpp8ysmWA6MzkruP5 QuZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KVSm8p7F; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=hknblGU2; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b="d/BC1w5x"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id o6-20020a170902d4c600b001b554fbd67bsi2057682plg.618.2023.06.20.06.54.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 06:54:29 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KVSm8p7F; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=hknblGU2; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b="d/BC1w5x"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qBbnb-0001px-3l; Tue, 20 Jun 2023 13:53:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qBbnW-0001pi-JO for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=l+wNbfWMVSGRfppEJ0L03IjOzdzGMm4QY2LeuThVV0Y=; b=KVSm8p7FIrg/thNaF6z040st5w shVGYmpngvHJ7tQ1KWEbKF9MMEVMroOqd3ICPsgdaqSj9jDNLFGdwHVRuLHfGBGXPfKlg6GMHrULG jpCpmNTSieHTjhhbtO5Jl5f1EFovJ0FUj+zhVGTobx7FNsU19Kdb9FJ7MJ2ZeqAQSolk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=l+wNbfWMVSGRfppEJ0L03IjOzdzGMm4QY2LeuThVV0Y=; b=hknblGU2YkOSIOnFkUqPSGMzCg g/Uc+Y9IPQK1Ctc0OprNucENSSy4bQtIMR1VmI2y/7ektHy/hBjgLt2qXaajfItjM3WQbIns7oI/Z tTK+4NB+FBm3fVQkYlse50oSKP7HsMTan7Fu/T9DF1JEQoPUkpwJ4TmEnZgyINcw5few=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qBbnQ-009n5v-Aj for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:30 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Qlp4T0y1gz9smP for ; Tue, 20 Jun 2023 15:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1687269193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l+wNbfWMVSGRfppEJ0L03IjOzdzGMm4QY2LeuThVV0Y=; b=d/BC1w5x0Exf1Jr4xEZzBAmpTkNReXu2RkKrunJHnv1r1eMGmRExc9xi9JuO538JiINTCj mo0veRUB17Vpfw06fkuk4aJNN6omId4ECsmS3GorVcKi6+uAz79iqnnqtij5I3NjLy7a3M ey3wTQpc3RlrDtWb7omcY6UmL6kjGE8jIhgFcPAGOg8bZCU31dfN/fb0f2Z2pT+vf6aUuB BtxoRXA0YtRPbkPqOM9C2/ytD5JFVP7pxZz59L50Ve/qoWJZNrLj9DWeSeg3T3j8ht/kQd lDTmSr6K6R5Ibi2PNYN6tffMwVzcdDbAi60vTMe34vrs6mjT2WXF0JEH7T22+w== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Tue, 20 Jun 2023 15:53:07 +0200 Message-Id: <20230620135310.94455-3-frank@lichtenheld.com> In-Reply-To: <20230620135310.94455-1-frank@lichtenheld.com> References: <20230509111205.138997-1-frank@lichtenheld.com> <20230620135310.94455-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4Qlp4T0y1gz9smP X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is based on the initial CMake patch by Arne Schwabe, but extends that to provide a complete replacement for existing MinGW build (autotools based) and MSVC build (openvpn.sln). The following features are added while switching these builds to CMake: - vcpkg support for MinGW build, allowing for trivial cross-compilation on Linux - Add unittests to MSVC build - Rework MSVC con [...] Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qBbnQ-009n5v-Aj Subject: [Openvpn-devel] [PATCH v3 2/5] CMake: Add complete MinGW and MSVC build X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1765414961882986669?= X-GMAIL-MSGID: =?utf-8?q?1769230061066406656?= This is based on the initial CMake patch by Arne Schwabe, but extends that to provide a complete replacement for existing MinGW build (autotools based) and MSVC build (openvpn.sln). The following features are added while switching these builds to CMake: - vcpkg support for MinGW build, allowing for trivial cross-compilation on Linux - Add unittests to MSVC build - Rework MSVC config header generation, removing need for separate headers between autotools and MSVC The following advantages are reasons for switching to CMake over the existing MSVC build: - Easier to maintain CMake files without IDE than the sln and vcxproj files - Able to maintain MSVC and MinGW build side-by-side The plan is to completely remove the existing MSVC build system but leave the existing autotools builds in place as-is, including MinGW support. CMake is not the intended build system for Unix-like platforms and there are no current plans to switch to it. v2: - Reduce default warning level for MSVC to /W2. With /W3 the build is just much too noisy, making it difficult to spot new warnings. - Change MSVC CMake presets to have hardcoded build type. When using pkg_search_module MSVC Multi-Config builds do not work correctly at all since PkgConfig doesn't seem to be able to create multi-config libraries like find_package does. - Change minGW presets to be Multi-Config capable. - Remove OPENVPN_VERSION_MAJOR, OPENVPN_VERSION_MINOR, OPENVPN_VERSION_PATCH from config.h.cmake.in. They are not required and cause macro redefinition warnings in MSVC (with openvpn-plugin.h). gcc doesn't warn about this because the definitions are identical so no need to fix this in autoheader config.h.in. v3: - Apply fixes by Lev Stipakov to match MSVC compile options better to previous build. - Apply change by Lev Stipakov to enable generation of PDB files. - Move /Brepro to its own commit. This is a behavior change that should be more visible. - Rebase on top of my dist fixes. Change-Id: I237f28eca618d4fc476225b887c0be26cca362b1 Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- .github/workflows/build.yaml | 298 ++--- .gitignore | 1 + CMakeLists.txt | 1008 ++++++++++------- CMakePresets.json | 228 ++++ Makefile.am | 5 +- config.h.cmake.in | 25 +- contrib/cmake/git-version.py | 75 ++ contrib/cmake/parse-version.m4.py | 58 + contrib/vcpkg-manifests/mingw/vcpkg.json | 13 + contrib/vcpkg-manifests/windows/vcpkg.json | 20 + .../vcpkg-ports/pkcs11-helper/portfile.cmake | 22 +- doc/CMakeLists.txt | 81 ++ doc/Makefile.am | 3 +- src/openvpnmsica/CMakeLists.txt | 36 + src/openvpnmsica/Makefile.am | 3 + src/openvpnserv/CMakeLists.txt | 34 + src/openvpnserv/Makefile.am | 3 + src/tapctl/CMakeLists.txt | 31 + src/tapctl/Makefile.am | 4 + 19 files changed, 1286 insertions(+), 662 deletions(-) create mode 100644 CMakePresets.json create mode 100644 contrib/cmake/git-version.py create mode 100644 contrib/cmake/parse-version.m4.py create mode 100644 contrib/vcpkg-manifests/mingw/vcpkg.json create mode 100644 contrib/vcpkg-manifests/windows/vcpkg.json create mode 100644 doc/CMakeLists.txt create mode 100644 src/openvpnmsica/CMakeLists.txt create mode 100644 src/openvpnserv/CMakeLists.txt create mode 100644 src/tapctl/CMakeLists.txt diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0c16d379..5f0a0761 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,230 +39,95 @@ jobs: strategy: fail-fast: false matrix: - osslver: [1.1.1q, 3.0.5] - target: [mingw64, mingw] - include: - - target: mingw64 - chost: x86_64-w64-mingw32 - - target: mingw - chost: i686-w64-mingw32 + arch: [x86, x64] - name: "gcc-mingw - ${{matrix.target}} - OSSL ${{ matrix.osslver }}" + name: "gcc-mingw - ${{ matrix.arch }} - OSSL" runs-on: ubuntu-22.04 env: - MAKEFLAGS: -j3 - LZO_VERSION: "2.10" - PKCS11_HELPER_VERSION: "1.29.0" - OPENSSL_VERSION: "${{ matrix.osslver }}" - TAP_WINDOWS_VERSION: "9.23.3" - CMOCKA_VERSION: "1.1.5" + VCPKG_ROOT: ${{ github.workspace }}/vcpkg steps: - name: Install dependencies - run: sudo apt update && sudo apt install -y mingw-w64 libtool automake autoconf man2html unzip cmake ninja-build build-essential wget + run: sudo apt update && sudo apt install -y mingw-w64 unzip cmake ninja-build build-essential wget python3-docutils man2html-base - name: Checkout OpenVPN uses: actions/checkout@v3 - with: - path: openvpn - - name: autoconf - run: autoreconf -fvi - working-directory: openvpn - - - name: Cache dependencies - id: cache - uses: actions/cache@v3 + - name: Restore from cache and install vcpkg + uses: lukka/run-vcpkg@v10 with: - path: '~/mingw/' - key: ${{ matrix.target }}-mingw-${{ matrix.osslver }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }}--${{ env.CMOCKA_VERSION }} - - # Repeating if: steps.cache.outputs.cache-hit != 'true' - # on every step for building dependencies is ugly but - # I haven't found a better solution so far. - - - name: Download mingw dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: | - wget -c -P download-cache/ "https://build.openvpn.net/downloads/releases/tap-windows-${TAP_WINDOWS_VERSION}.zip" - wget -c -P download-cache/ "https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz" - wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" - wget -c -P download-cache/ "https://github.com/coreboot/cmocka/archive/refs/tags/cmocka-${CMOCKA_VERSION}.tar.gz" - tar jxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" - wget -c -P download-cache/ "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" || wget -c -P download-cache/ "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" - tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" - tar zxf "download-cache/lzo-${LZO_VERSION}.tar.gz" - tar zxf "download-cache/cmocka-${CMOCKA_VERSION}.tar.gz" - unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip - - - name: create cmocka build directory - if: steps.cache.outputs.cache-hit != 'true' - run: mkdir cmocka-build - - - name: configure cmocka - if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./cmocka-build" - run: cmake -GNinja -DCMAKE_C_COMPILER=${{ matrix.chost }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.chost }}-g++ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SHARED_LINKER_FLAGS=-static-libgcc -DCMAKE_PREFIX_PATH=${HOME}/mingw/opt/lib/pkgconfig/ -DCMAKE_INCLUDE_PATH=${HOME}/mingw/opt/lib/include -DCMAKE_LIBRARY_PATH=${HOME}/mingw/opt/lib -DCMAKE_INSTALL_PREFIX=${HOME}/mingw/opt/ ../cmocka-cmocka-${{ env.CMOCKA_VERSION }} - - - name: build cmocka - if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./cmocka-build" - run: ninja - - - name: install cmocka - if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./cmocka-build" - run: ninja install - - - name: Configure OpenSSL - if: steps.cache.outputs.cache-hit != 'true' - run: ./Configure --cross-compile-prefix=${{ matrix.chost }}- shared ${{ matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc - working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - - - name: Build OpenSSL - if: steps.cache.outputs.cache-hit != 'true' - run: make - working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - - # OpenSSL 3.0.5 installs itself into mingw/opt/lib64 instead of - # mingw/opt/lib, so we include both dirs in the following steps - # (pkcs11-helper and OpenVPN) so the libraries will be found - - name: Install OpenSSL - if: steps.cache.outputs.cache-hit != 'true' - run: make install - working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - - - name: autoreconf pkcs11-helper - if: steps.cache.outputs.cache-hit != 'true' - run: autoreconf -iv - working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - - - name: configure pkcs11-helper - if: steps.cache.outputs.cache-hit != 'true' - run: OPENSSL_LIBS="-L${HOME}/mingw/opt/lib -L${HOME}/mingw/opt/lib64 -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig ./configure --host=${{ matrix.chost }} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu --disable-crypto-engine-gnutls --disable-crypto-engine-nss --disable-crypto-engine-polarssl --disable-crypto-engine-mbedtls - working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - - - name: build pkcs11-helper - if: steps.cache.outputs.cache-hit != 'true' - run: make all - working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - - - name: install pkcs11-helper - if: steps.cache.outputs.cache-hit != 'true' - run: make install - working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - - - name: Configure lzo - if: steps.cache.outputs.cache-hit != 'true' - run: ./configure --host=${{ matrix.chost }} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu - working-directory: "./lzo-${{ env.LZO_VERSION }}" - - - name: build lzo - if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-${{ env.LZO_VERSION }}" - run: make - - - name: install lzo - if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-${{ env.LZO_VERSION }}" - run: make install - - - name: copy tap-windows.h header - if: steps.cache.outputs.cache-hit != 'true' - run: cp ./tap-windows-${TAP_WINDOWS_VERSION}/include/tap-windows.h ${HOME}/mingw/opt/include/ - - - name: configure OpenVPN - run: PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig LDFLAGS=-L$HOME/mingw/opt/lib CFLAGS=-I$HOME/mingw/opt/include OPENSSL_LIBS="-L${HOME}/opt/lib -L$HOME/mingw/opt/lib64 -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PREFIX=$HOME/mingw/opt LZO_CFLAGS=-I$HOME/mingw/opt/include LZO_LIBS="-L${HOME}/mingw/opt/lib -llzo2" ./configure --host=${{ matrix.chost }} --disable-lz4 - working-directory: openvpn - - - name: build OpenVPN - run: make -j3 - working-directory: openvpn - - name: build OpenVPN unittests - run: make -j3 check - working-directory: openvpn + vcpkgGitCommitId: 'd10d511f25620ca0f315cd83dcef6485efc63010' + vcpkgJsonGlob: '**/mingw/vcpkg.json' + appendedCacheKey: mingw_${{ matrix.arch }} - # We use multiple upload-artifact here, so it becomes a flat folder - # structure since we need the dlls on the same level as the binaries - - name: Archive cmocka/openssl/lzo dlls - uses: actions/upload-artifact@v3 + - name: Run CMake with vcpkg.json manifest + uses: lukka/run-cmake@v10 with: - retention-days: 1 - name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls - path: '~/mingw/opt/bin/*.dll' - - # libtool puts some wrapper binaries in openvpn/tests/unit_tests/openvpn/ - # and the real binaries in openvpn/tests/unit_tests/openvpn/.libs/ - - name: Archive unittest artifacts - uses: actions/upload-artifact@v3 + configurePreset: mingw-${{ matrix.arch }} + buildPreset: mingw-${{ matrix.arch }} + buildPresetAdditionalArgs: "['--config Debug']" + + - uses: actions/upload-artifact@v3 with: - retention-days: 1 - name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests - path: openvpn/tests/unit_tests/openvpn/.libs/*.exe - - # Currently not used by the unit test but might in the future and also - # helpful if manually downloading and running openvpn.exe from a mingw - # build - - name: Archive openvpn binary - uses: actions/upload-artifact@v3 + name: openvpn-mingw-${{ matrix.arch }} + path: | + ${{ github.workspace }}/out/build/mingw/${{ matrix.arch }}/Debug/*.exe + ${{ github.workspace }}/out/build/mingw/${{ matrix.arch }}/Debug/*.dll + !${{ github.workspace }}/out/build/mingw/${{ matrix.arch }}/Debug/test_*.exe + + - uses: actions/upload-artifact@v3 with: - retention-days: 1 - name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests - path: openvpn/src/openvpn/.libs/*.exe + name: openvpn-mingw-${{ matrix.arch }}-tests + path: | + ${{ github.workspace }}/out/build/mingw/${{ matrix.arch }}/Debug/test_*.exe + ${{ github.workspace }}/out/build/mingw/${{ matrix.arch }}/Debug/*.dll mingw-unittest: needs: [ mingw ] strategy: fail-fast: false matrix: - osslver: [ 1.1.1q, 3.0.5 ] - target: [ mingw64, mingw ] + arch: [x86, x64] runs-on: windows-latest - name: "mingw unittests - ${{matrix.target}} - OSSL ${{ matrix.osslver }}" + name: "mingw unittests - ${{ matrix.arch }} - OSSL" steps: - - name: Retrieve mingw unittest dlls - uses: actions/download-artifact@v3 - with: - name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls - path: unittests - - name: Retrieve mingw unittest uses: actions/download-artifact@v3 with: - name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests + name: openvpn-mingw-${{ matrix.arch }}-tests path: unittests - name: List unittests directory run: "dir unittests" - - name: Run argvunit test - run: ./unittests/argv_testdriver.exe + - name: Run argv unit test + run: ./unittests/test_argv.exe - - name: Run auth_tokenunit test - run: ./unittests/auth_token_testdriver.exe + - name: Run auth_token unit test + run: ./unittests/test_auth_token.exe - - name: Run bufferunit test - run: ./unittests/buffer_testdriver.exe + - name: Run buffer unit test + run: ./unittests/test_buffer.exe - name: Run cryptoapi unit test - run: ./unittests/cryptoapi_testdriver.exe + run: ./unittests/test_cryptoapi.exe - - name: Run cryptounit test - run: ./unittests/crypto_testdriver.exe + - name: Run crypto unit test + run: ./unittests/test_crypto.exe - - name: Run miscunit test - run: ./unittests/misc_testdriver.exe + - name: Run misc unit test + run: ./unittests/test_misc.exe - - name: Run ncpunit test - run: ./unittests/ncp_testdriver.exe + - name: Run ncp unit test + run: ./unittests/test_ncp.exe - - name: Run packet idunit test - run: ./unittests/packet_id_testdriver.exe + - name: Run packet id unit test + run: ./unittests/test_packet_id.exe - - name: Run pktunit test - run: ./unittests/pkt_testdriver.exe + - name: Run pkt unit test + run: ./unittests/test_pkt.exe - - name: Run providerunit test - run: ./unittests/provider_testdriver.exe + - name: Run provider unit test + run: ./unittests/test_provider.exe ubuntu: strategy: @@ -411,60 +276,51 @@ jobs: strategy: fail-fast: false matrix: - plat: [ARM64, Win32, x64] - include: - - plat: ARM64 - triplet: arm64 - - plat: Win32 - triplet: x86 - - plat: x64 - triplet: x64 - - name: "msbuild - ${{matrix.triplet}} - openssl" + arch: [amd64, x86, arm64] + + name: "msbuild - ${{ matrix.arch }} - openssl" env: BUILD_CONFIGURATION: Release - VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/contrib/vcpkg-ports - VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/contrib/vcpkg-triplets runs-on: windows-latest steps: - uses: actions/checkout@v3 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.1 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' + - uses: lukka/get-cmake@latest - name: Install rst2html - run: python -m pip install --upgrade pip rst2html + run: python -m pip install --upgrade pip docutils - name: Restore artifacts, or setup vcpkg (do not install any package) uses: lukka/run-vcpkg@v10 with: vcpkgGitCommitId: 'd10d511f25620ca0f315cd83dcef6485efc63010' - vcpkgJsonGlob: '**/openvpn/vcpkg.json' - appendedCacheKey: '${{matrix.triplet}}' + vcpkgJsonGlob: '**/windows/vcpkg.json' + appendedCacheKey: msvc_${{ matrix.arch }} - - name: Run MSBuild consuming vcpkg.json - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - # workaround for GHA runner bug where vcpkg installation is detected at c:\vcpkg - # see https://github.com/lukka/run-vcpkg/issues/170 - ${{ github.workspace }}/vcpkg/vcpkg.exe integrate install - msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="${{ matrix.plat }}" . + - name: Run CMake with vcpkg.json manifest (NO TESTS) + uses: lukka/run-cmake@v10 + if: ${{ matrix.arch == 'arm64' }} + with: + configurePreset: win-${{ matrix.arch }}-release + buildPreset: win-${{ matrix.arch }}-release + + - name: Run CMake with vcpkg.json manifest + uses: lukka/run-cmake@v10 + if: ${{ matrix.arch != 'arm64' }} + with: + configurePreset: win-${{ matrix.arch }}-release + buildPreset: win-${{ matrix.arch }}-release + testPreset: win-${{ matrix.arch }}-release - - name: Archive artifacts - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 with: - name: artifacts-${{ matrix.plat }} + name: openvpn-msvc-${{ matrix.arch }} path: | - ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.exe - ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll - ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb - doc/openvpn.8.html + ${{ github.workspace }}/out/**/*.exe + ${{ github.workspace }}/out/**/*.dll + !${{ github.workspace }}/out/**/test_*.exe + !${{ github.workspace }}/out/**/CMakeFiles/** + !${{ github.workspace }}/out/**/vcpkg_installed/** trigger_openvpn_build: runs-on: windows-latest diff --git a/.gitignore b/.gitignore index bedbf519..658f57e5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ Release Debug Win32-Output +out .vs .deps .libs diff --git a/CMakeLists.txt b/CMakeLists.txt index 9978ea40..bdbc87b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ - cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.12) +set(CMAKE_CONFIGURATION_TYPES "Release;Debug;ASAN") project(openvpn) # This CMake file implements building OpenVPN with CMAKE @@ -11,10 +12,6 @@ project(openvpn) # and OpenSSL having version 1.1.1+ and generally does not offer the same # configurability like autoconf -# -DCMAKE_TOOLCHAIN_FILE=C:/Users/User/source/repos/vcpkg/scripts/buildsystems/vcpkg.cmake -#-DVCPKG_OVERLAY_PORTS=C:/Users/User/source/repos/openvpn/contrib/vcpkg-ports -#-GNinja - option(UNSUPPORTED_BUILDS "Allow unsupported builds" OFF) if (NOT WIN32 AND NOT ${UNSUPPORTED_BUILDS}) @@ -23,48 +20,83 @@ endif() option(MBED "BUILD with mbed" OFF) option(WOLFSSL "BUILD with wolfSSL" OFF) -if (MSVC) - option(USE_WERROR "Treat compiler warnings as errors (-Werror)" OFF) -else () - option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) -endif () -option(PLUGIN_DIR "Location of the plugin directory" /usr/local/lib/openvpn/plugins) +option(ENABLE_LZ4 "BUILD with lz4" ON) +option(ENABLE_LZO "BUILD with lzo" ON) +option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) +option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) + +set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory") # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to build with ASAN set(CMAKE_C_FLAGS_ASAN - "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - CACHE STRING "Flags used by the C compiler during AddressSanitizer builds." - FORCE) + "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + CACHE STRING "Flags used by the C compiler during AddressSanitizer builds." + FORCE) set(CMAKE_CXX_FLAGS_ASAN - "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" - CACHE STRING "Flags used by the C++ compiler during AddressSanitizer builds." - FORCE) + "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1" + CACHE STRING "Flags used by the C++ compiler during AddressSanitizer builds." + FORCE) if (MSVC) - target_compile_options(${target} PRIVATE /W3) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS) + if (USE_WERROR) + add_compile_options(/WX) + endif () + add_compile_options( + /MP + /W2 + /sdl + /Qspectre + /guard:cf + /FC + /ZH:SHA_256 + "$<$:/GL>" + "$<$:/Oi>" + "$<$:/Gy>" + "$<$:/Zi>" + ) + add_link_options( + "$<$:/LTCG:incremental>" + "$<$:/DEBUG:FULL>" + "$<$:/OPT:REF>" + "$<$:/OPT:ICF>" + ) + if (${CMAKE_GENERATOR_PLATFORM} STREQUAL "x64" OR ${CMAKE_GENERATOR_PLATFORM} STREQUAL "x86") + add_link_options("$<$:/CETCOMPAT>") + endif() else () - add_compile_options(-Wall -Wuninitialized) + set(CMAKE_C_FLAGS_RELEASE "-O2") + set(CMAKE_CXX_FLAGS_RELEASE "-O2") + set(CMAKE_C_FLAGS_DEBUG "-g -O1") + set(CMAKE_CXX_FLAGS_DEBUG "-g -O1") + add_compile_options(-Wall -Wuninitialized -Wno-stringop-truncation) # We are not ready for this - #add_compile_options(-Wsign-compare) + #add_compile_options(-Wconversion -Wno-sign-conversion -Wsign-compare) + if (USE_WERROR) + add_compile_options(-Werror) + endif () endif () -find_package(PkgConfig) -INCLUDE(CheckSymbolExists) -INCLUDE(CheckIncludeFiles) -INCLUDE(CheckTypeSize) -INCLUDE(CheckStructHasMember) +find_package(PkgConfig REQUIRED) +include(CheckSymbolExists) +include(CheckIncludeFiles) +include(CheckTypeSize) +include(CheckStructHasMember) +include(CTest) -set(OPENVPN_VERSION_MAJOR 2) -set(OPENVPN_VERSION_MINOR 6) -set(OPENVPN_VERSION_PATCH _git) +find_program(PYTHON NAMES python3 python) +execute_process( + COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/parse-version.m4.py ${CMAKE_CURRENT_SOURCE_DIR}/version.m4 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +include(${CMAKE_CURRENT_BINARY_DIR}/version.cmake) -if (NOT WIN32) - add_definitions(-DPLUGIN_LIBDIR=\"${PLUGIN_DIR}\") -endif () - -# TODO remove later when msvc-config.h is removed and we can always include config.h -add_definitions(-DHAVE_CONFIG_H) +set(OPENVPN_VERSION_MAJOR ${PRODUCT_VERSION_MAJOR}) +set(OPENVPN_VERSION_MINOR ${PRODUCT_VERSION_MINOR}) +set(OPENVPN_VERSION_PATCH ${PRODUCT_VERSION_PATCH}) +set(OPENVPN_VERSION_RESOURCE ${PRODUCT_VERSION_RESOURCE}) +set(CMAKE_C_STANDARD 99) # Set the various defines for config.h.cmake.in if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") @@ -97,139 +129,133 @@ elseif (WIN32) set(TARGET_WIN32 YES) endif () -CHECK_SYMBOL_EXISTS(chroot unistd.h HAVE_CHROOT) -CHECK_SYMBOL_EXISTS(chdir unistd.h HAVE_CHDIR) -CHECK_SYMBOL_EXISTS(dup unistd.h HAVE_DUP) -CHECK_SYMBOL_EXISTS(dup2 unistd.h HAVE_DUP2) -CHECK_SYMBOL_EXISTS(fork unistd.h HAVE_FORK) -CHECK_SYMBOL_EXISTS(execve unistd.h HAVE_EXECVE) -CHECK_SYMBOL_EXISTS(ftruncate unistd.h HAVE_FTRUNCATE) -CHECK_SYMBOL_EXISTS(setgid unistd.h HAVE_SETGID) -CHECK_SYMBOL_EXISTS(setuid unistd.h HAVE_SETUID) -CHECK_SYMBOL_EXISTS(getpeereid unistd.h HAVE_GETPEEREID) - -CHECK_SYMBOL_EXISTS(epoll_create sys/epoll.h HAVE_EPOLL_CREATE) - -CHECK_SYMBOL_EXISTS(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) -CHECK_SYMBOL_EXISTS(basename libgen.h HAVE_BASENAME) -CHECK_SYMBOL_EXISTS(chsize io.h HAVE_CHSIZE) -CHECK_SYMBOL_EXISTS(daemon stdlib.h HAVE_DAEMON) -CHECK_SYMBOL_EXISTS(dirname libgen.h HAVE_DIRNAME) -CHECK_SYMBOL_EXISTS(getrlimit sys/resource.h HAVE_GETRLIMIT) -CHECK_SYMBOL_EXISTS(mlockall sys/mman.h HAVE_MLOCKALL) - -CHECK_SYMBOL_EXISTS(sendmsg sys/socket.h HAVE_SENDMSG) -CHECK_SYMBOL_EXISTS(recvmsg sys/socket.h HAVE_RECVMSG) -CHECK_SYMBOL_EXISTS(cmsghdr sys/socket.h HAVE_CMSGHDR) -CHECK_SYMBOL_EXISTS(openlog syslog.h HAVE_OPENLOG) -CHECK_SYMBOL_EXISTS(syslog syslog.h HAVE_SYSLOG) -CHECK_SYMBOL_EXISTS(getgrnam grp.h HAVE_GETGRNAM) -CHECK_SYMBOL_EXISTS(getpwnam pwd.h HAVE_GETPWNAM) -CHECK_SYMBOL_EXISTS(getsockname sys/socket.h HAVE_GETSOCKNAME) +check_symbol_exists(chroot unistd.h HAVE_CHROOT) +check_symbol_exists(chdir unistd.h HAVE_CHDIR) +check_symbol_exists(dup unistd.h HAVE_DUP) +check_symbol_exists(dup2 unistd.h HAVE_DUP2) +check_symbol_exists(fork unistd.h HAVE_FORK) +check_symbol_exists(execve unistd.h HAVE_EXECVE) +check_symbol_exists(ftruncate unistd.h HAVE_FTRUNCATE) +check_symbol_exists(setgid unistd.h HAVE_SETGID) +check_symbol_exists(setuid unistd.h HAVE_SETUID) +check_symbol_exists(getpeereid unistd.h HAVE_GETPEEREID) + +check_symbol_exists(epoll_create sys/epoll.h HAVE_EPOLL_CREATE) + +check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) +check_symbol_exists(basename libgen.h HAVE_BASENAME) +check_symbol_exists(chsize io.h HAVE_CHSIZE) +check_symbol_exists(daemon stdlib.h HAVE_DAEMON) +check_symbol_exists(dirname libgen.h HAVE_DIRNAME) +check_symbol_exists(getrlimit sys/resource.h HAVE_GETRLIMIT) +check_symbol_exists(mlockall sys/mman.h HAVE_MLOCKALL) + +check_symbol_exists(sendmsg sys/socket.h HAVE_SENDMSG) +check_symbol_exists(recvmsg sys/socket.h HAVE_RECVMSG) +check_symbol_exists(cmsghdr sys/socket.h HAVE_CMSGHDR) +check_symbol_exists(openlog syslog.h HAVE_OPENLOG) +check_symbol_exists(syslog syslog.h HAVE_SYSLOG) +check_symbol_exists(getgrnam grp.h HAVE_GETGRNAM) +check_symbol_exists(getpwnam pwd.h HAVE_GETPWNAM) +check_symbol_exists(getsockname sys/socket.h HAVE_GETSOCKNAME) # Some OS (e.g. FreeBSD) need some basic headers to allow # including network headers -SET(NETEXTRA sys/types.h) -CHECK_INCLUDE_FILES("${NETEXTRA};netinet/in.h" HAVE_NETINET_IN_H) +set(NETEXTRA sys/types.h) +check_include_files("${NETEXTRA};netinet/in.h" HAVE_NETINET_IN_H) if (HAVE_NETINET_IN_H) - LIST(APPEND NETEXTRA netinet/in.h) + list(APPEND NETEXTRA netinet/in.h) endif () -CHECK_INCLUDE_FILES("${NETEXTRA};netinet/in6.h" HAVE_NETINET_IN_H) -CHECK_INCLUDE_FILES(linux/if_tun.h HAVE_LINUX_IF_TUN_H) -CHECK_INCLUDE_FILES(linux/sockios.h HAVE_LINUX_SOCKIOS_H) -CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H) -CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H) -CHECK_INCLUDE_FILES(dmalloc.h HAVE_DMALLOC_H) -CHECK_INCLUDE_FILES(err.h HAVE_ERR_H) -CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H) -CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H) -CHECK_INCLUDE_FILES(sys/socket.h HAVE_SYS_SOCKET_H) -CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H) -CHECK_INCLUDE_FILES(netdb.h HAVE_NETDB_H) -CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H) -CHECK_INCLUDE_FILES(sys/un.h HAVE_SYS_UN_H) -CHECK_INCLUDE_FILES(libgen.h HAVE_LIBGEN_H) -CHECK_INCLUDE_FILES(net/if.h HAVE_NET_IF_H) -CHECK_INCLUDE_FILES("${NETEXTRA};netinet/ip.h" HAVE_NETINET_IP_H) -CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H) -CHECK_INCLUDE_FILES(net/if_utun.h HAVE_NET_UTUN_H) -CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H) -CHECK_INCLUDE_FILES(sys/inotify.h HAVE_SYS_INOTIFY_H) -CHECK_INCLUDE_FILES("${NETEXTRA};sys/uio.h" HAVE_SYS_UIO_H) -CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H) -CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H) -CHECK_INCLUDE_FILES(grp.h HAVE_GRP_H) -CHECK_INCLUDE_FILES(pwd.h HAVE_PWD_H) -CHECK_INCLUDE_FILES(sys/mman.h HAVE_SYS_MMAN_H) - - -CHECK_INCLUDE_FILES("${NETEXTRA};resolv.h" HAVE_RESOLV_H) -CHECK_INCLUDE_FILES("${NETEXTRA};net/if_tun.h" HAVE_NET_IF_TUN_H) - -# Is this obscure header needed anywhere?! -CHECK_INCLUDE_FILES(netinet/in_systm.h HAVE_NETINET_IN_SYSTM_H) - - -SET(CMAKE_EXTRA_INCLUDE_FILES netinet/ip.h) -CHECK_TYPE_SIZE("struct in_pktinfo" IN_PKTINFO) -CHECK_STRUCT_HAS_MEMBER("struct in_pktinfo" ipi_spec_dst netinet/ip.h HAVE_IPI_SPEC_DST) -CHECK_TYPE_SIZE("struct msghdr" MSGHDR) -SET(CMAKE_EXTRA_INCLUDE_FILES) +check_include_files("${NETEXTRA};netinet/in6.h" HAVE_NETINET_IN_H) +check_include_files(linux/if_tun.h HAVE_LINUX_IF_TUN_H) +check_include_files(linux/sockios.h HAVE_LINUX_SOCKIOS_H) +check_include_files(dlfcn.h HAVE_DLFCN_H) +check_include_files(fcntl.h HAVE_FCNTL_H) +check_include_files(dmalloc.h HAVE_DMALLOC_H) +check_include_files(err.h HAVE_ERR_H) +check_include_files(sys/epoll.h HAVE_SYS_EPOLL_H) +check_include_files(poll.h HAVE_POLL_H) +check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) +check_include_files(sys/time.h HAVE_SYS_TIME_H) +check_include_files(netdb.h HAVE_NETDB_H) +check_include_files(unistd.h HAVE_UNISTD_H) +check_include_files(sys/un.h HAVE_SYS_UN_H) +check_include_files(libgen.h HAVE_LIBGEN_H) +check_include_files(net/if.h HAVE_NET_IF_H) +check_include_files("${NETEXTRA};netinet/ip.h" HAVE_NETINET_IP_H) +check_include_files(arpa/inet.h HAVE_ARPA_INET_H) +check_include_files(net/if_utun.h HAVE_NET_UTUN_H) +check_include_files(sys/ioctl.h HAVE_SYS_IOCTL_H) +check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H) +check_include_files("${NETEXTRA};sys/uio.h" HAVE_SYS_UIO_H) +check_include_files(syslog.h HAVE_SYSLOG_H) +check_include_files(sys/wait.h HAVE_SYS_WAIT_H) +check_include_files(grp.h HAVE_GRP_H) +check_include_files(pwd.h HAVE_PWD_H) +check_include_files(sys/mman.h HAVE_SYS_MMAN_H) + + +check_include_files("${NETEXTRA};resolv.h" HAVE_RESOLV_H) +check_include_files("${NETEXTRA};net/if_tun.h" HAVE_NET_IF_TUN_H) + +set(CMAKE_EXTRA_INCLUDE_FILES netinet/ip.h) +check_type_size("struct in_pktinfo" IN_PKTINFO) +check_struct_has_member("struct in_pktinfo" ipi_spec_dst netinet/ip.h HAVE_IPI_SPEC_DST) +check_type_size("struct msghdr" MSGHDR) +set(CMAKE_EXTRA_INCLUDE_FILES) find_program(IFCONFIG_PATH ifconfig) find_program(IPROUTE_PATH ip) find_program(ROUTE_PATH route) +if (${ENABLE_LZ4}) + pkg_search_module(liblz4 liblz4 REQUIRED IMPORTED_TARGET) +endif () -if (NOT WIN32) - set(ENABLE_LZ4 YES) - set(ENABLE_LZO YES) +if (${ENABLE_LZO}) + pkg_search_module(lzo2 lzo2 REQUIRED IMPORTED_TARGET) +endif () + +if (${ENABLE_PKCS11}) + pkg_search_module(pkcs11-helper libpkcs11-helper-1 REQUIRED IMPORTED_TARGET) endif () function(add_library_deps target) if (${MBED}) - target_include_directories(${target} PRIVATE $ENV{HOME}/oss/mbedtls2/include) - message("Building ${target} for mbed TLS") - target_link_libraries(${target} PUBLIC -L$ENV{HOME}/oss/mbedtls2/library -L/usr/local/opt/lzo/lib -lmbedtls -lmbedx509 -lmbedcrypto) + target_link_libraries(${target} -lmbedtls -lmbedx509 -lmbedcrypto) elseif (${WOLFSSL}) pkg_search_module(wolfssl wolfssl REQUIRED) target_link_libraries(${target} PUBLIC ${wolfssl_LINK_LIBRARIES}) target_include_directories(${target} PRIVATE ${wolfssl_INCLUDE_DIRS}/wolfssl) - message("Building ${target} for WolfSSL: ${wolfssl_LINK_LIBRARIES} ${wolfssl_INCLUDE_DIRS}/wolfsll") else () set(ENABLE_X509ALTUSERNAME YES) find_package(OpenSSL REQUIRED) - target_link_libraries(${target} PUBLIC OpenSSL::SSL) - - message("Building ${target} for default OpenSSL") - endif () - + target_link_libraries(${target} PUBLIC OpenSSL::SSL OpenSSL::Crypto) + if (WIN32) + target_link_libraries(${target} PUBLIC + ws2_32.lib crypt32.lib fwpuclnt.lib iphlpapi.lib + wininet.lib setupapi.lib rpcrt4.lib wtsapi32.lib ncrypt.lib bcrypt.lib) + endif () - if (${ENABLE_LZ4}) - pkg_search_module(liblz4 liblz4 REQUIRED IMPORTED_TARGET) - target_link_libraries(${target} PUBLIC PkgConfig::liblz4) endif () - if (${ENABLE_LZO}) - pkg_search_module(lzo2 lzo2 REQUIRED IMPORTED_TARGET) - target_link_libraries(${target} PUBLIC PkgConfig::lzo2) - endif () + # optional dependencies + target_link_libraries(${target} PUBLIC + $ + $ + $ + ) if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - target_include_directories(${target} PUBLIC ${LIBNL_INCLUDE_DIRS}) - target_link_libraries(${target} PUBLIC ${LIBNL_LIBRARIES}) - endif () + pkg_search_module(libcapng REQUIRED libcap-ng IMPORTED_TARGET) + pkg_search_module(libnl REQUIRED libnl-genl-3.0 IMPORTED_TARGET) - if (USE_WERROR) - if (MSVC) - target_compile_options(${target} PRIVATE /WX) - else () - target_compile_options(${target} PRIVATE -Werror) - endif () + target_link_libraries(${target} PUBLIC PkgConfig::libcapng PkgConfig::libnl) endif () + endfunction() if (${MBED}) @@ -245,240 +271,254 @@ endif () include_directories(${CMAKE_CURRENT_SOURCE_DIR} src/compat include) -if (WIN32) - find_package(OpenSSL REQUIRED) - - link_libraries(OpenSSL::SSL OpenSSL::Crypto ws2_32.lib Crypt32.lib fwpuclnt.lib iphlpapi.lib - wininet.lib setupapi.lib rpcrt4.lib wtsapi32.lib Ncrypt.lib) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D _WINSOCK_DEPRECATED_NO_WARNINGS -D_CONSOLE) -endif () +add_custom_command( + OUTPUT always_rebuild config-version.h + COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/git-version.py + ) +set(HAVE_CONFIG_VERSION_H YES) configure_file(config.h.cmake.in config.h) configure_file(include/openvpn-plugin.h.in openvpn-plugin.h) +# TODO remove later when msvc-config.h is removed and we can always include config.h +add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -set(SOURCE_FILES - ${CMAKE_CURRENT_BINARY_DIR}/config.h - ${CMAKE_CURRENT_BINARY_DIR}/openvpn-plugin.h +add_subdirectory(doc) +add_subdirectory(src/openvpnmsica) +add_subdirectory(src/openvpnserv) +add_subdirectory(src/tapctl) - src/compat/compat-basename.c - src/compat/compat-daemon.c - src/compat/compat-dirname.c - src/compat/compat-gettimeofday.c - src/compat/compat-strsep.c - src/compat/compat-versionhelpers.h - src/openvpn/argv.c - src/openvpn/argv.h - src/openvpn/base64.c - src/openvpn/base64.h - src/openvpn/basic.h - src/openvpn/block_dns.h - src/openvpn/block_dns.c - src/openvpn/buffer.c - src/openvpn/buffer.h - src/openvpn/circ_list.h - src/openvpn/clinat.c - src/openvpn/clinat.h - src/openvpn/common.h - src/openvpn/comp-lz4.c - src/openvpn/comp-lz4.h - src/openvpn/comp.c - src/openvpn/comp.h - src/openvpn/compstub.c - src/openvpn/console.c - src/openvpn/console_builtin.c - src/openvpn/console.h - src/openvpn/crypto.c - src/openvpn/crypto.h - src/openvpn/crypto_backend.h - src/openvpn/crypto_openssl.c - src/openvpn/crypto_openssl.h - src/openvpn/crypto_mbedtls.c - src/openvpn/crypto_mbedtls.h - src/openvpn/cryptoapi.c - src/openvpn/cryptoapi.h - src/openvpn/dco.c - src/openvpn/dco.h - src/openvpn/dco_win.c - src/openvpn/dco_win.h - src/openvpn/dco_linux.c - src/openvpn/dco_linux.h - src/openvpn/dco_freebsd.c - src/openvpn/dco_freebsd.h - src/openvpn/dhcp.c - src/openvpn/dhcp.h - src/openvpn/dns.c - src/openvpn/dns.h - src/openvpn/errlevel.h - src/openvpn/env_set.c - src/openvpn/env_set.h - src/openvpn/error.c - src/openvpn/error.h - src/openvpn/event.c - src/openvpn/event.h - src/openvpn/fdmisc.c - src/openvpn/fdmisc.h - src/openvpn/forward.c - src/openvpn/forward.h - src/openvpn/fragment.c - src/openvpn/fragment.h - src/openvpn/gremlin.c - src/openvpn/gremlin.h - src/openvpn/helper.c - src/openvpn/helper.h - src/openvpn/httpdigest.c - src/openvpn/httpdigest.h - src/openvpn/init.c - src/openvpn/init.h - src/openvpn/integer.h - src/openvpn/interval.c - src/openvpn/interval.h - src/openvpn/list.c - src/openvpn/list.h - src/openvpn/lladdr.c - src/openvpn/lladdr.h - src/openvpn/lzo.c - src/openvpn/lzo.h - src/openvpn/manage.c - src/openvpn/manage.h - src/openvpn/mbuf.c - src/openvpn/mbuf.h - src/openvpn/memdbg.h - src/openvpn/misc.c - src/openvpn/misc.h - src/openvpn/mroute.c - src/openvpn/mroute.h - src/openvpn/mss.c - src/openvpn/mss.h - src/openvpn/mstats.c - src/openvpn/mstats.h - src/openvpn/mtcp.c - src/openvpn/mtcp.h - src/openvpn/mtu.c - src/openvpn/mtu.h - src/openvpn/mudp.c - src/openvpn/mudp.h - src/openvpn/multi.c - src/openvpn/multi.h - src/openvpn/ntlm.c - src/openvpn/ntlm.h - src/openvpn/occ.c - src/openvpn/occ.h - src/openvpn/openvpn.c - src/openvpn/openvpn.h - src/openvpn/options.c - src/openvpn/options.h - src/openvpn/options_util.c - src/openvpn/options_util.h - src/openvpn/otime.c - src/openvpn/otime.h - src/openvpn/ovpn_dco_win.h - src/openvpn/packet_id.c - src/openvpn/packet_id.h - src/openvpn/perf.c - src/openvpn/perf.h - src/openvpn/ping.c - src/openvpn/ping.h - src/openvpn/pkcs11.c - src/openvpn/pkcs11.h - src/openvpn/pkcs11_backend.h - src/openvpn/pkcs11_openssl.c - src/openvpn/pkcs11_mbedtls.c - src/openvpn/platform.c - src/openvpn/platform.h - src/openvpn/plugin.c - src/openvpn/plugin.h - src/openvpn/pool.c - src/openvpn/pool.h - src/openvpn/proto.c - src/openvpn/proto.h - src/openvpn/proxy.c - src/openvpn/proxy.h - src/openvpn/ps.c - src/openvpn/ps.h - src/openvpn/push.c - src/openvpn/push.h - src/openvpn/pushlist.h - src/openvpn/reliable.c - src/openvpn/reliable.h - src/openvpn/route.c - src/openvpn/route.h - src/openvpn/run_command.c - src/openvpn/run_command.h - src/openvpn/schedule.c - src/openvpn/schedule.h - src/openvpn/session_id.c - src/openvpn/session_id.h - src/openvpn/shaper.c - src/openvpn/shaper.h - src/openvpn/sig.c - src/openvpn/sig.h - src/openvpn/socket.c - src/openvpn/socket.h - src/openvpn/socks.c - src/openvpn/socks.h - src/openvpn/ssl.c - src/openvpn/ssl.h - src/openvpn/ssl_backend.h - src/openvpn/ssl_common.h - src/openvpn/ssl_openssl.c - src/openvpn/ssl_openssl.h - src/openvpn/ssl_mbedtls.c - src/openvpn/ssl_mbedtls.h - src/openvpn/ssl_verify.c - src/openvpn/ssl_verify.h - src/openvpn/ssl_verify_backend.h - src/openvpn/ssl_verify_openssl.c - src/openvpn/ssl_verify_openssl.h - src/openvpn/ssl_verify_mbedtls.c - src/openvpn/ssl_verify_mbedtls.h - src/openvpn/status.c - src/openvpn/status.h - src/openvpn/syshead.h - src/openvpn/tls_crypt.c - src/openvpn/tun.c - src/openvpn/tun.h - src/openvpn/networking_sitnl.c - src/openvpn/networking_freebsd.c - src/openvpn/auth_token.c - src/openvpn/auth_token.h - src/openvpn/ssl_ncp.c - src/openvpn/ssl_ncp.h - src/openvpn/ssl_pkt.c - src/openvpn/ssl_pkt.h - src/openvpn/ssl_util.c - src/openvpn/ssl_util.h - src/openvpn/vlan.c - src/openvpn/vlan.h - src/openvpn/win32.c - src/openvpn/win32-util.c - src/openvpn/win32.h - src/openvpn/win32-util.h - src/openvpn/xkey_helper.c - src/openvpn/xkey_provider.c - ) +set(SOURCE_FILES + ${CMAKE_CURRENT_BINARY_DIR}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/config-version.h + ${CMAKE_CURRENT_BINARY_DIR}/openvpn-plugin.h + + src/compat/compat-basename.c + src/compat/compat-daemon.c + src/compat/compat-dirname.c + src/compat/compat-gettimeofday.c + src/compat/compat-strsep.c + src/compat/compat-versionhelpers.h + src/openvpn/argv.c + src/openvpn/argv.h + src/openvpn/base64.c + src/openvpn/base64.h + src/openvpn/basic.h + src/openvpn/block_dns.h + src/openvpn/block_dns.c + src/openvpn/buffer.c + src/openvpn/buffer.h + src/openvpn/circ_list.h + src/openvpn/clinat.c + src/openvpn/clinat.h + src/openvpn/common.h + src/openvpn/comp-lz4.c + src/openvpn/comp-lz4.h + src/openvpn/comp.c + src/openvpn/comp.h + src/openvpn/compstub.c + src/openvpn/console.c + src/openvpn/console_builtin.c + src/openvpn/console.h + src/openvpn/crypto.c + src/openvpn/crypto.h + src/openvpn/crypto_backend.h + src/openvpn/crypto_openssl.c + src/openvpn/crypto_openssl.h + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_mbedtls.h + src/openvpn/cryptoapi.c + src/openvpn/cryptoapi.h + src/openvpn/dco.c + src/openvpn/dco.h + src/openvpn/dco_win.c + src/openvpn/dco_win.h + src/openvpn/dco_linux.c + src/openvpn/dco_linux.h + src/openvpn/dco_freebsd.c + src/openvpn/dco_freebsd.h + src/openvpn/dhcp.c + src/openvpn/dhcp.h + src/openvpn/dns.c + src/openvpn/dns.h + src/openvpn/errlevel.h + src/openvpn/env_set.c + src/openvpn/env_set.h + src/openvpn/error.c + src/openvpn/error.h + src/openvpn/event.c + src/openvpn/event.h + src/openvpn/fdmisc.c + src/openvpn/fdmisc.h + src/openvpn/forward.c + src/openvpn/forward.h + src/openvpn/fragment.c + src/openvpn/fragment.h + src/openvpn/gremlin.c + src/openvpn/gremlin.h + src/openvpn/helper.c + src/openvpn/helper.h + src/openvpn/httpdigest.c + src/openvpn/httpdigest.h + src/openvpn/init.c + src/openvpn/init.h + src/openvpn/integer.h + src/openvpn/interval.c + src/openvpn/interval.h + src/openvpn/list.c + src/openvpn/list.h + src/openvpn/lladdr.c + src/openvpn/lladdr.h + src/openvpn/lzo.c + src/openvpn/lzo.h + src/openvpn/manage.c + src/openvpn/manage.h + src/openvpn/mbuf.c + src/openvpn/mbuf.h + src/openvpn/memdbg.h + src/openvpn/misc.c + src/openvpn/misc.h + src/openvpn/mroute.c + src/openvpn/mroute.h + src/openvpn/mss.c + src/openvpn/mss.h + src/openvpn/mstats.c + src/openvpn/mstats.h + src/openvpn/mtcp.c + src/openvpn/mtcp.h + src/openvpn/mtu.c + src/openvpn/mtu.h + src/openvpn/mudp.c + src/openvpn/mudp.h + src/openvpn/multi.c + src/openvpn/multi.h + src/openvpn/ntlm.c + src/openvpn/ntlm.h + src/openvpn/occ.c + src/openvpn/occ.h + src/openvpn/openvpn.c + src/openvpn/openvpn.h + src/openvpn/openvpn_win32_resources.rc + src/openvpn/options.c + src/openvpn/options.h + src/openvpn/options_util.c + src/openvpn/options_util.h + src/openvpn/otime.c + src/openvpn/otime.h + src/openvpn/ovpn_dco_win.h + src/openvpn/packet_id.c + src/openvpn/packet_id.h + src/openvpn/perf.c + src/openvpn/perf.h + src/openvpn/ping.c + src/openvpn/ping.h + src/openvpn/pkcs11.c + src/openvpn/pkcs11.h + src/openvpn/pkcs11_backend.h + src/openvpn/pkcs11_openssl.c + src/openvpn/pkcs11_mbedtls.c + src/openvpn/platform.c + src/openvpn/platform.h + src/openvpn/plugin.c + src/openvpn/plugin.h + src/openvpn/pool.c + src/openvpn/pool.h + src/openvpn/proto.c + src/openvpn/proto.h + src/openvpn/proxy.c + src/openvpn/proxy.h + src/openvpn/ps.c + src/openvpn/ps.h + src/openvpn/push.c + src/openvpn/push.h + src/openvpn/pushlist.h + src/openvpn/reflect_filter.c + src/openvpn/reflect_filter.h + src/openvpn/reliable.c + src/openvpn/reliable.h + src/openvpn/route.c + src/openvpn/route.h + src/openvpn/run_command.c + src/openvpn/run_command.h + src/openvpn/schedule.c + src/openvpn/schedule.h + src/openvpn/session_id.c + src/openvpn/session_id.h + src/openvpn/shaper.c + src/openvpn/shaper.h + src/openvpn/sig.c + src/openvpn/sig.h + src/openvpn/socket.c + src/openvpn/socket.h + src/openvpn/socks.c + src/openvpn/socks.h + src/openvpn/ssl.c + src/openvpn/ssl.h + src/openvpn/ssl_backend.h + src/openvpn/ssl_common.h + src/openvpn/ssl_openssl.c + src/openvpn/ssl_openssl.h + src/openvpn/ssl_mbedtls.c + src/openvpn/ssl_mbedtls.h + src/openvpn/ssl_verify.c + src/openvpn/ssl_verify.h + src/openvpn/ssl_verify_backend.h + src/openvpn/ssl_verify_openssl.c + src/openvpn/ssl_verify_openssl.h + src/openvpn/ssl_verify_mbedtls.c + src/openvpn/ssl_verify_mbedtls.h + src/openvpn/status.c + src/openvpn/status.h + src/openvpn/syshead.h + src/openvpn/tls_crypt.c + src/openvpn/tun.c + src/openvpn/tun.h + src/openvpn/networking_sitnl.c + src/openvpn/networking_freebsd.c + src/openvpn/auth_token.c + src/openvpn/auth_token.h + src/openvpn/ssl_ncp.c + src/openvpn/ssl_ncp.h + src/openvpn/ssl_pkt.c + src/openvpn/ssl_pkt.h + src/openvpn/ssl_util.c + src/openvpn/ssl_util.h + src/openvpn/vlan.c + src/openvpn/vlan.h + src/openvpn/win32.c + src/openvpn/win32-util.c + src/openvpn/win32.h + src/openvpn/win32-util.h + src/openvpn/xkey_helper.c + src/openvpn/xkey_provider.c + ) add_executable(openvpn ${SOURCE_FILES}) add_library_deps(openvpn) -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - target_link_libraries(openvpn PUBLIC -ldl) - - find_package(PkgConfig) - pkg_search_module(LIBNL REQUIRED libnl-genl-3.0) - - target_link_libraries(openvpn PUBLIC ${LIBNL_LIBRARIES}) - target_include_directories(openvpn PRIVATE ${LIBNL_INCLUDE_DIRS}) -endif () - - if (MINGW) + target_compile_options(openvpn PRIVATE + -DWIN32_LEAN_AND_MEAN + -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) + target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) +endif() + +if (MSVC) + # we have our own manifest + target_link_options(openvpn PRIVATE /MANIFEST:NO) +endif() + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(openvpn PUBLIC -ldl) endif () if (NOT WIN32) + target_compile_options(openvpn PRIVATE -DPLUGIN_LIBDIR=\"${PLUGIN_DIR}\") + find_library(resolv resolv) # some platform like BSDs already include resolver functionality in the libc and not have an extra resolv library if (${resolv} OR APPLE) @@ -487,58 +527,155 @@ if (NOT WIN32) endif () -pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET) -enable_testing() +if (BUILD_TESTING) + find_package(cmocka CONFIG) + if (TARGET cmocka::cmocka) + set(CMOCKA_LIBRARIES cmocka::cmocka) + else () + pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET) + set(CMOCKA_LIBRARIES PkgConfig::cmocka) + endif () -SET(unit_tests "test_packet_id" "test_crypto" "test_ncp" "test_auth_token" "test_misc" "test_buffer" "test_provider" "test_pkt") + set(unit_tests + "test_auth_token" + "test_buffer" + "test_crypto" + "test_misc" + "test_ncp" + "test_packet_id" + "test_pkt" + "test_provider" + ) -# These tests work on only on Linux since they depend on special linker features -if (WIN32) - LIST(APPEND unit_tests "test_cryptoapi") -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - LIST(APPEND unit_tests "test_networking" "test_tls_crypt" "test_argv") -endif () + if (WIN32) + list(APPEND unit_tests + "test_cryptoapi" + ) + endif () + + if (NOT MSVC) + # MSVC does not support --wrap + list(APPEND unit_tests + "test_argv" + ) + endif () + + # These tests work on only on Linux since they depend on special linker features + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + list(APPEND unit_tests + "test_networking" + "test_tls_crypt" + ) + endif () + + if (NOT WIN32 AND ${ENABLE_PKCS11}) + set(_HAVE_SOFTHSM2 YES) + find_program(P11TOOL p11tool) + find_program(SOFTHSM2_UTIL softhsm2-util) + find_library(SOFTHSM2_MODULE softhsm2 PATH_SUFFIXES softhsm) + + if (P11TOOL STREQUAL "P11TOOL-NOTFOUND") + message(STATUS "p11tool not found, pkcs11 UT disabled") + set(_HAVE_SOFTHSM2 NO) + elseif (SOFTHSM2_UTIL STREQUAL "SOFTHSM2_UTIL-NOTFOUND") + message(STATUS "softhsm2-util not found, pkcs11 UT disabled") + set(_HAVE_SOFTHSM2 NO) + elseif (SOFTHSM2_MODULE STREQUAL "SOFTHSM2_MODULE-NOTFOUND") + message(STATUS "softhsm2 module not found, pkcs11 UT disabled") + set(_HAVE_SOFTHSM2 NO) + endif () + if (_HAVE_SOFTHSM2) + message(VERBOSE "pkcs11 UT enabled") + list(APPEND unit_tests + "test_pkcs11" + ) + endif () + endif () -FOREACH (test_name ${unit_tests}) - add_executable(${test_name} + foreach (test_name ${unit_tests}) + # test_networking needs special environment + if (NOT ${test_name} STREQUAL "test_networking") + add_test(${test_name} ${test_name}) + endif () + add_executable(${test_name} tests/unit_tests/openvpn/${test_name}.c tests/unit_tests/openvpn/mock_msg.c + tests/unit_tests/openvpn/mock_msg.h src/openvpn/platform.c - src/openvpn/crypto_mbedtls.c - src/openvpn/crypto_openssl.c - src/openvpn/crypto.c - src/openvpn/otime.c - src/openvpn/packet_id.c - src/openvpn/base64.c src/openvpn/win32-util.c - src/openvpn/mtu.c - src/openvpn/networking_sitnl.c - src/compat/compat-strsep.c src/compat/compat-gettimeofday.c - src/openvpn/ssl_util.c - src/openvpn/reliable.c - src/openvpn/session_id.c - src/openvpn/mss.c - src/openvpn/xkey_provider.c ) - add_library_deps(${test_name}) - target_link_libraries(${test_name} PUBLIC PkgConfig::cmocka) + add_library_deps(${test_name}) + target_link_libraries(${test_name} PUBLIC ${CMOCKA_LIBRARIES}) - target_include_directories(${test_name} PRIVATE src/openvpn) + target_include_directories(${test_name} PRIVATE src/openvpn) - if (NOT ${test_name} STREQUAL "test_buffer") - target_sources(${test_name} PRIVATE + if (NOT ${test_name} STREQUAL "test_buffer") + target_sources(${test_name} PRIVATE src/openvpn/buffer.c ) - endif () - add_test(NAME ${test_name} COMMAND ${test_name}) -ENDFOREACH () + endif () + + endforeach() -target_sources(test_pkt PRIVATE + target_sources(test_auth_token PRIVATE + src/openvpn/base64.c + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/otime.c + src/openvpn/packet_id.c + ) + + target_sources(test_buffer PRIVATE + tests/unit_tests/openvpn/mock_get_random.c + ) + + target_sources(test_crypto PRIVATE + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/otime.c + src/openvpn/packet_id.c + src/openvpn/mtu.c + src/openvpn/mss.c + ) + + target_sources(test_misc PRIVATE + tests/unit_tests/openvpn/mock_get_random.c + src/openvpn/options_util.c + src/openvpn/ssl_util.c + ) + + target_sources(test_ncp PRIVATE + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/otime.c + src/openvpn/packet_id.c + src/openvpn/ssl_util.c + src/compat/compat-strsep.c + ) + + target_sources(test_packet_id PRIVATE + tests/unit_tests/openvpn/mock_get_random.c + src/openvpn/otime.c + src/openvpn/packet_id.c + src/openvpn/reliable.c + src/openvpn/session_id.c + ) + + target_sources(test_pkt PRIVATE src/openvpn/argv.c + src/openvpn/base64.c + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c src/openvpn/env_set.c + src/openvpn/otime.c + src/openvpn/packet_id.c src/openvpn/reliable.c src/openvpn/run_command.c src/openvpn/session_id.c @@ -546,46 +683,83 @@ target_sources(test_pkt PRIVATE src/openvpn/tls_crypt.c ) -if (TARGET test_cryptoapi) - target_sources(test_cryptoapi PRIVATE - src/openvpn/xkey_helper.c - src/openvpn/xkey_provider.c - ) -endif () - -target_sources(test_provider PRIVATE + target_sources(test_provider PRIVATE + tests/unit_tests/openvpn/mock_get_random.c src/openvpn/xkey_provider.c src/openvpn/xkey_helper.c + src/openvpn/base64.c ) -target_sources(test_misc PRIVATE - src/openvpn/options_util.c - ) - -IF (TARGET test_tls_crypt) - target_sources(test_tls_crypt PRIVATE - src/openvpn/argv.c - src/openvpn/env_set.c - src/openvpn/run_command.c) -endif () - -if (TARGET test_argv) - target_sources(test_argv PRIVATE + if (TARGET test_argv) + target_link_options(test_argv PRIVATE -Wl,--wrap=parse_line) + target_sources(test_argv PRIVATE + tests/unit_tests/openvpn/mock_get_random.c src/openvpn/argv.c - src/openvpn/env_set.c - src/openvpn/run_command.c) -endif () + ) + endif () + if (TARGET test_cryptoapi) + target_sources(test_cryptoapi PRIVATE + tests/unit_tests/openvpn/mock_get_random.c + tests/unit_tests/openvpn/cert_data.h + tests/unit_tests/openvpn/pkey_test_utils.c + src/openvpn/xkey_provider.c + src/openvpn/xkey_helper.c + src/openvpn/base64.c + ) + endif () -FOREACH (test_name "networking" "tls_crypt" "argv") - if (TARGET test_${test_name}) - target_link_options(test_${test_name} PRIVATE -Wl,--wrap=parse_line) + if (TARGET test_networking) + target_link_options(test_networking PRIVATE -Wl,--wrap=parse_line) + target_compile_options(test_networking PRIVATE -UNDEBUG) + target_sources(test_networking PRIVATE + src/openvpn/networking_sitnl.c + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/otime.c + src/openvpn/packet_id.c + ) endif () -ENDFOREACH () -if (TARGET test_tls_crypt) - target_link_options("test_tls_crypt" PRIVATE + if (TARGET test_tls_crypt) + target_link_options(test_tls_crypt PRIVATE -Wl,--wrap=parse_line) + target_link_options(test_tls_crypt PRIVATE -Wl,--wrap=buffer_read_from_file -Wl,--wrap=buffer_write_file -Wl,--wrap=rand_bytes) -ENDIF () \ No newline at end of file + target_sources(test_tls_crypt PRIVATE + src/openvpn/argv.c + src/openvpn/base64.c + src/openvpn/crypto_mbedtls.c + src/openvpn/crypto_openssl.c + src/openvpn/crypto.c + src/openvpn/env_set.c + src/openvpn/otime.c + src/openvpn/packet_id.c + src/openvpn/run_command.c + ) + endif () + + if (TARGET test_pkcs11) + target_compile_options(test_pkcs11 PRIVATE + -DP11TOOL_PATH=\"${P11TOOL}\" + -DSOFTHSM2_MODULE_PATH=\"${SOFTHSM2_MODULE}\" + -DSOFTHSM2_UTIL_PATH=\"${SOFTHSM2_UTIL}\" + ) + target_sources(test_pkcs11 PRIVATE + tests/unit_tests/openvpn/mock_get_random.c + tests/unit_tests/openvpn/pkey_test_utils.c + src/openvpn/argv.c + src/openvpn/base64.c + src/openvpn/env_set.c + src/openvpn/otime.c + src/openvpn/pkcs11.c + src/openvpn/pkcs11_openssl.c + src/openvpn/run_command.c + src/openvpn/xkey_helper.c + src/openvpn/xkey_provider.c + ) + endif () + +endif (BUILD_TESTING) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..135b19d0 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,228 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "base", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": { + "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "type": "FILEPATH" + }, + "VCPKG_OVERLAY_TRIPLETS": { + "value": "${sourceDir}/contrib/vcpkg-triplets", + "type": "FILEPATH" + }, + "VCPKG_OVERLAY_PORTS": { + "value": "${sourceDir}/contrib/vcpkg-ports", + "type": "FILEPATH" + } + } + }, + { + "name": "base-windows", + "hidden": true, + "binaryDir": "${sourceDir}/out/build/${presetName}", + "generator": "Visual Studio 17 2022", + "cacheVariables": { + "VCPKG_MANIFEST_DIR": "${sourceDir}/contrib/vcpkg-manifests/windows", + "VCPKG_HOST_TRIPLET": "x64-windows" + }, + "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } } + }, + { + "name": "base-mingw", + "hidden": true, + "generator": "Ninja Multi-Config", + "cacheVariables": { + "CMAKE_SYSTEM_NAME": { + "value": "Windows", + "type": "STRING" + }, + "VCPKG_MANIFEST_DIR": "${sourceDir}/contrib/vcpkg-manifests/mingw" + } + }, + { + "name": "x64", + "hidden": true, + "architecture": { + "value": "x64", + "strategy": "set" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows-ovpn" + } + }, + { + "name": "x64-mingw", + "hidden": true, + "binaryDir": "out/build/mingw/x64", + "cacheVariables": { + "CMAKE_C_COMPILER": { + "value": "x86_64-w64-mingw32-gcc", + "type": "STRING" + }, + "CMAKE_CXX_COMPILER": { + "value": "x86_64-w64-mingw32-g++", + "type": "STRING" + }, + "VCPKG_TARGET_TRIPLET": "x64-mingw-ovpn" + } + }, + { + "name": "arm64", + "hidden": true, + "architecture": { + "value": "arm64", + "strategy": "set" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "arm64-windows-ovpn" + } + }, + { + "name": "x86", + "hidden": true, + "architecture": { + "value": "Win32", + "strategy": "set" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x86-windows-ovpn" + } + }, + { + "name": "i686-mingw", + "hidden": true, + "binaryDir": "out/build/mingw/x86", + "cacheVariables": { + "CMAKE_C_COMPILER": { + "value": "i686-w64-mingw32-gcc", + "type": "STRING" + }, + "CMAKE_CXX_COMPILER": { + "value": "i686-w64-mingw32-g++", + "type": "STRING" + }, + "VCPKG_TARGET_TRIPLET": "x86-mingw-ovpn" + } + }, + { + "name": "debug", + "hidden": true, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "release", + "hidden": true, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "mingw-x64", + "inherits": [ "base", "base-mingw", "x64-mingw" ] + }, + { + "name": "mingw-x86", + "inherits": [ "base", "base-mingw", "i686-mingw" ] + }, + { + "name": "win-amd64-release", + "inherits": [ "base", "base-windows", "x64", "release" ] + }, + { + "name": "win-arm64-release", + "inherits": [ "base", "base-windows", "arm64", "release" ] + }, + { + "name": "win-x86-release", + "inherits": [ "base", "base-windows", "x86", "release" ] + }, + { + "name": "win-amd64-debug", + "inherits": [ "base", "base-windows", "x64", "debug" ] + }, + { + "name": "win-arm64-debug", + "inherits": [ "base", "base-windows", "arm64", "debug" ] + }, + { + "name": "win-x86-debug", + "inherits": [ "base", "base-windows", "x86", "debug" ] + }, + { + "name": "unix-native", + "generator": "Ninja Multi-Config", + "binaryDir": "out/build/unix" + } + ], + "buildPresets": [ + { + "name": "mingw-x64", + "configurePreset": "mingw-x64" + }, + { + "name": "mingw-x86", + "configurePreset": "mingw-x86" + }, + { + "name": "win-amd64-release", + "configurePreset": "win-amd64-release", + "configuration": "Release" + }, + { + "name": "win-arm64-release", + "configurePreset": "win-arm64-release", + "configuration": "Release" + }, + { + "name": "win-x86-release", + "configurePreset": "win-x86-release", + "configuration": "Release" + }, + { + "name": "win-amd64-debug", + "configurePreset": "win-amd64-debug", + "configuration": "Debug" + }, + { + "name": "win-arm64-debug", + "configurePreset": "win-arm64-debug", + "configuration": "Debug" + }, + { + "name": "win-x86-debug", + "configurePreset": "win-x86-debug", + "configuration": "Debug" + }, + { + "name": "unix-native", + "configurePreset": "unix-native" + } + ], + "testPresets": [ + { + "name": "win-amd64-release", + "configurePreset": "win-amd64-release" + }, + { + "name": "win-x86-release", + "configurePreset": "win-x86-release" + }, + { + "name": "win-amd64-debug", + "configurePreset": "win-amd64-debug" + }, + { + "name": "win-x86-debug", + "configurePreset": "win-x86-debug" + }, + { + "name": "unix-native", + "configurePreset": "unix-native" + } + ] +} diff --git a/Makefile.am b/Makefile.am index 27da974d..9bdbe7ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,10 @@ CLEANFILES = \ EXTRA_DIST = \ contrib \ - debug + debug \ + CMakeLists.txt \ + CMakePresets.json \ + config.h.cmake.in .PHONY: config-version.h doxygen diff --git a/config.h.cmake.in b/config.h.cmake.in index 61859716..7ef7175e 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -42,7 +42,7 @@ #define ENABLE_OFB_CFB_MODE /* Enable PKCS11 */ -/* #undef ENABLE_PKCS11 */ +#cmakedefine ENABLE_PKCS11 /* Enable plug-in support */ #define ENABLE_PLUGIN 1 @@ -83,6 +83,9 @@ /* struct cmsghdr needed for extended socket error support */ #cmakedefine HAVE_CMSGHDR +/* git version information in config-version.h */ +#cmakedefine HAVE_CONFIG_VERSION_H + /* Define to 1 if you have the `daemon' function. */ #cmakedefine HAVE_DAEMON @@ -193,9 +196,6 @@ don't. */ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETINET_IN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_SYSTM_H - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETINET_IP_H @@ -398,14 +398,8 @@ don't. */ /* Path to route tool */ #define ROUTE_PATH "@ROUTE_PATH@" -/* OpenVPN major version - integer */ -#undef OPENVPN_VERSION_MAJOR - -/* OpenVPN minor version - integer */ -#undef OPENVPN_VERSION_MINOR - -/* OpenVPN patch level - may be a string or integer */ -#define OPENVPN_VERSION_PATCH "@OPENVPN_VERSION_PATCH@" +/* OpenVPN version in Windows resource format - string */ +#define OPENVPN_VERSION_RESOURCE @OPENVPN_VERSION_RESOURCE@ /* Name of package */ #define PACKAGE "openvpn" @@ -422,12 +416,6 @@ don't. */ /* Define to the version of this package. */ #define PACKAGE_VERSION "@OPENVPN_VERSION_MAJOR@.@OPENVPN_VERSION_MINOR@@OPENVPN_VERSION_PATCH@" -/* OpenVPN major version - integer */ -#define OPENVPN_VERSION_MAJOR @OPENVPN_VERSION_MAJOR@ - -/* OpenVPN minor version - integer */ -#define OPENVPN_VERSION_MINOR @OPENVPN_VERSION_MINOR@ - /* Path to systemd-ask-password tool */ #undef SYSTEMD_ASK_PASSWORD_PATH @@ -481,7 +469,6 @@ typedef SSIZE_T ssize_t; #define strncasecmp strnicmp #define strcasecmp _stricmp - #define S_IRUSR 0 #define S_IWUSR 0 #define R_OK 4 diff --git a/contrib/cmake/git-version.py b/contrib/cmake/git-version.py new file mode 100644 index 00000000..c2b44527 --- /dev/null +++ b/contrib/cmake/git-version.py @@ -0,0 +1,75 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2022-2023 OpenVPN Inc +# Copyright (C) 2022-2022 Lev Stipakov +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +import os +import sys +import subprocess + +def run_command(args): + sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + o, _ = sp.communicate() + return o.decode("utf-8")[:-1] + +def get_branch_commit_id(): + commit_id = run_command(["git", "rev-parse", "--short=16", "HEAD"]) + if not commit_id: + raise + branch = run_command(["git", "describe", "--exact-match"]) + if not branch: + # this returns an array like ["master"] or ["release", "2.6"] + branch = run_command(["git", "rev-parse", "--symbolic-full-name", "HEAD"]).split("/")[2:] + if not branch: + branch = ["none"] + branch = "/" .join(branch) # handle cases like release/2.6 + + return branch, commit_id + +def main(): + try: + branch, commit_id = get_branch_commit_id() + except: + branch, commit_id = "unknown", "unknown" + + prev_content = "" + + name = os.path.join("%s" % (sys.argv[1] if len(sys.argv) > 1 else "."), "config-version.h") + try: + with open(name, "r") as f: + prev_content = f.read() + except: + # file doesn't exist + pass + + content = "#define CONFIGURE_GIT_REVISION \"%s/%s\"\n" % (branch, commit_id) + content += "#define CONFIGURE_GIT_FLAGS \"\"\n" + + if prev_content != content: + print("Writing %s" % name) + with open(name, "w") as f: + f.write(content) + else: + print("Content of %s hasn't changed" % name) + +if __name__ == "__main__": + main() diff --git a/contrib/cmake/parse-version.m4.py b/contrib/cmake/parse-version.m4.py new file mode 100644 index 00000000..26af6a8f --- /dev/null +++ b/contrib/cmake/parse-version.m4.py @@ -0,0 +1,58 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2022-2023 OpenVPN Inc +# Copyright (C) 2022-2022 Lev Stipakov +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +import os +import re +import sys + +def main(): + assert len(sys.argv) > 1 + version_path = sys.argv[1] + output = [] + with open(version_path, 'r') as version_file: + for line in version_file: + match = re.match(r'[ \t]*define\(\[(.*)\],[ \t]*\[(.*)\]\)[ \t]*', line) + if match is not None: + output.append(match.expand(r'set(\1 \2)')) + out_path = os.path.join("%s" % (sys.argv[2] if len(sys.argv) > 2 else "."), "version.cmake") + + prev_content = "" + try: + with open(out_path, "r") as out_file: + prev_content = out_file.read() + except: + # file doesn't exist + pass + + content = "\n".join(output) + "\n" + if prev_content != content: + print("Writing %s" % out_path) + with open(out_path, "w") as out_file: + out_file.write(content) + else: + print("Content of %s hasn't changed" % out_path) + +if __name__ == "__main__": + main() + diff --git a/contrib/vcpkg-manifests/mingw/vcpkg.json b/contrib/vcpkg-manifests/mingw/vcpkg.json new file mode 100644 index 00000000..fc00b019 --- /dev/null +++ b/contrib/vcpkg-manifests/mingw/vcpkg.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "openvpn", + "version": "2.7", + "dependencies": [ + "openssl", + "tap-windows6", + "lzo", + "lz4", + "pkcs11-helper", + "cmocka" + ] +} diff --git a/contrib/vcpkg-manifests/windows/vcpkg.json b/contrib/vcpkg-manifests/windows/vcpkg.json new file mode 100644 index 00000000..67a1f87c --- /dev/null +++ b/contrib/vcpkg-manifests/windows/vcpkg.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "openvpn", + "version": "2.7", + "dependencies": [ + { + "name": "openssl", + "features": ["tools"] + }, + "tap-windows6", + "lzo", + "lz4", + "pkcs11-helper", + "cmocka", + { + "name": "pkgconf", + "host": true + } + ] +} diff --git a/contrib/vcpkg-ports/pkcs11-helper/portfile.cmake b/contrib/vcpkg-ports/pkcs11-helper/portfile.cmake index 47919bc6..f8da979e 100644 --- a/contrib/vcpkg-ports/pkcs11-helper/portfile.cmake +++ b/contrib/vcpkg-ports/pkcs11-helper/portfile.cmake @@ -28,12 +28,28 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) OPENSSL_HOME=${CURRENT_PACKAGES_DIR}/../openssl_${TARGET_TRIPLET} ) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/pkcs11-helper.dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/pkcs11-helper.dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/pkcs11-helper.dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pkcs11-helper.lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/pkcs11-helper.dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME pkcs11-helper.lib) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/libpkcs11-helper-1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/libpkcs11-helper-1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + set(PACKAGE_VERSION "${VERSION}") + set(libdir [[${prefix}/lib]]) + set(exec_prefix [[${prefix}]]) + set(PKCS11H_FEATURES key_prompt openssl engine_crypto_cryptoapi engine_crypto_openssl debug threading token data certificate slotevent engine_crypto) + set(LIBS -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(includedir [[${prefix}/include]]) + set(outfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpkcs11-helper-1.pc") + configure_file("${SOURCE_PATH}/lib/libpkcs11-helper-1.pc.in" "${outfile}" @ONLY) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(includedir [[${prefix}/../include]]) + set(outfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpkcs11-helper-1.pc") + configure_file("${SOURCE_PATH}/lib/libpkcs11-helper-1.pc.in" "${outfile}" @ONLY) + endif() + file(INSTALL ${SOURCE_PATH}/include/pkcs11-helper-1.0 DESTINATION ${CURRENT_PACKAGES_DIR}/include/) else() @@ -45,11 +61,11 @@ else() --disable-crypto-engine-polarssl --disable-crypto-engine-mbedtls ) vcpkg_install_make() - vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") endif() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 00000000..1034226d --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,81 @@ +set(_GENERATE_HTML_DOC YES) +set(_GENERATE_MAN_DOC YES) +find_program(RST2HTML NAMES rst2html rst2html.py) +find_program(RST2MAN NAMES rst2man rst2man.py) + +if (RST2HTML STREQUAL "RST2HTML-NOTFOUND") + message(STATUS "rst2html not found, not generating HTML documentation") + set(_GENERATE_HTML_DOC NO) +endif () +if (RST2MAN STREQUAL "RST2MAN-NOTFOUND") + message(STATUS "rst2man not found, not generating HTML documentation") + set(_GENERATE_MAN_DOC NO) +endif () + +set(OPENVPN_SECTIONS + man-sections/advanced-options.rst + man-sections/cipher-negotiation.rst + man-sections/client-options.rst + man-sections/connection-profiles.rst + man-sections/encryption-options.rst + man-sections/generic-options.rst + man-sections/inline-files.rst + man-sections/link-options.rst + man-sections/log-options.rst + man-sections/management-options.rst + man-sections/network-config.rst + man-sections/pkcs11-options.rst + man-sections/plugin-options.rst + man-sections/protocol-options.rst + man-sections/proxy-options.rst + man-sections/renegotiation.rst + man-sections/signals.rst + man-sections/script-options.rst + man-sections/server-options.rst + man-sections/tls-options.rst + man-sections/unsupported-options.rst + man-sections/virtual-routing-and-forwarding.rst + man-sections/vpn-network-options.rst + man-sections/windows-options.rst + ) + +set(OPENVPN_EXAMPLES_SECTIONS + man-sections/example-fingerprint.rst + man-sections/examples.rst + ) + +set(RST_FLAGS --strict) + +if (_GENERATE_HTML_DOC) + list(APPEND ALL_DOCS openvpn.8.html openvpn-examples.5.html) + add_custom_command( + OUTPUT openvpn.8.html + COMMAND ${PYTHON} ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8.html + MAIN_DEPENDENCY openvpn.8.rst + DEPENDS ${OPENVPN_SECTIONS} + ) + add_custom_command( + OUTPUT openvpn-examples.5.html + COMMAND ${PYTHON} ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5.html + MAIN_DEPENDENCY openvpn-examples.5.rst + DEPENDS ${OPENVPN_EXAMPLES_SECTIONS} + ) +endif () +if (_GENERATE_MAN_DOC) + list(APPEND ALL_DOCS openvpn.8 openvpn-examples.5) + add_custom_command( + OUTPUT openvpn.8 + COMMAND ${PYTHON} ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8 + MAIN_DEPENDENCY openvpn.8.rst + DEPENDS ${OPENVPN_SECTIONS} + ) + add_custom_command( + OUTPUT openvpn-examples.5 + COMMAND ${PYTHON} ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5 + MAIN_DEPENDENCY openvpn-examples.5.rst + DEPENDS ${OPENVPN_EXAMPLES_SECTIONS} + ) +endif () + +add_custom_target(documentation ALL DEPENDS ${ALL_DOCS}) + diff --git a/doc/Makefile.am b/doc/Makefile.am index d8ffe2e0..087f0cee 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -63,7 +63,8 @@ dist_noinst_DATA = \ README.plugins \ tls-crypt-v2.txt \ $(openvpn_sections) \ - $(openvpn_examples_sections) + $(openvpn_examples_sections) \ + CMakeLists.txt EXTRA_DIST = tests diff --git a/src/openvpnmsica/CMakeLists.txt b/src/openvpnmsica/CMakeLists.txt new file mode 100644 index 00000000..683d38e0 --- /dev/null +++ b/src/openvpnmsica/CMakeLists.txt @@ -0,0 +1,36 @@ +if (NOT WIN32) + return () +endif () + +project(openvpnmsica) + +add_library(openvpnmsica SHARED) + +target_include_directories(openvpnmsica PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/../../ + ../../include/ + ../compat/ + ) +target_sources(openvpnmsica PRIVATE + dllmain.c + msiex.c msiex.h + msica_arg.c msica_arg.h + openvpnmsica.c openvpnmsica.h + ../tapctl/basic.h + ../tapctl/error.c ../tapctl/error.h + ../tapctl/tap.c ../tapctl/tap.h + openvpnmsica_resources.rc + ) +target_compile_options(openvpnmsica PRIVATE + -D_UNICODE + -UNTDDI_VERSION + -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) +target_link_libraries(openvpnmsica + advapi32.lib ole32.lib msi.lib setupapi.lib iphlpapi.lib shell32.lib shlwapi.lib version.lib newdev.lib) +if (MINGW) + target_compile_options(openvpnmsica PRIVATE -municode) + target_link_options(openvpnmsica PRIVATE -municode) + target_link_options(openvpnmsica PRIVATE + -Wl,--kill-at) +endif () diff --git a/src/openvpnmsica/Makefile.am b/src/openvpnmsica/Makefile.am index 6da0754d..d68a0089 100644 --- a/src/openvpnmsica/Makefile.am +++ b/src/openvpnmsica/Makefile.am @@ -34,6 +34,9 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ $(TAP_CFLAGS) +EXTRA_DIST = \ + CMakeLists.txt + if WIN32 lib_LTLIBRARIES = libopenvpnmsica.la libopenvpnmsica_la_CFLAGS = \ diff --git a/src/openvpnserv/CMakeLists.txt b/src/openvpnserv/CMakeLists.txt new file mode 100644 index 00000000..17cd90c6 --- /dev/null +++ b/src/openvpnserv/CMakeLists.txt @@ -0,0 +1,34 @@ +if (NOT WIN32) + return () +endif () + +project(openvpnserv) + +add_executable(openvpnserv) + +target_include_directories(openvpnserv PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/../../ + ../../include/ + ../openvpn/ + ../compat/ + ) +target_sources(openvpnserv PRIVATE + common.c + interactive.c + service.c service.h + validate.c validate.h + ../openvpn/block_dns.c ../openvpn/block_dns.h + openvpnserv_resources.rc + ../openvpn/ring_buffer.h + ) +target_compile_options(openvpnserv PRIVATE + -D_UNICODE + -UNTDDI_VERSION + -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) +target_link_libraries(openvpnserv + advapi32.lib userenv.lib iphlpapi.lib fwpuclnt.lib rpcrt4.lib shlwapi.lib netapi32.lib ws2_32.lib ntdll.lib) +if (MINGW) + target_compile_options(openvpnserv PRIVATE -municode) + target_link_options(openvpnserv PRIVATE -municode) +endif () diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am index b8b2a378..4c0ac40c 100644 --- a/src/openvpnserv/Makefile.am +++ b/src/openvpnserv/Makefile.am @@ -19,6 +19,9 @@ EXTRA_DIST = \ AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat +EXTRA_DIST = \ + CMakeLists.txt + if WIN32 sbin_PROGRAMS = openvpnserv openvpnserv_CFLAGS = \ diff --git a/src/tapctl/CMakeLists.txt b/src/tapctl/CMakeLists.txt new file mode 100644 index 00000000..97702c01 --- /dev/null +++ b/src/tapctl/CMakeLists.txt @@ -0,0 +1,31 @@ +if (NOT WIN32) + return () +endif () + +project(tapctl) + +add_executable(tapctl) + +target_include_directories(tapctl PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/../../ + ../../include/ + ../compat/ + ) +target_sources(tapctl PRIVATE + basic.h + error.c error.h + main.c + tap.c tap.h + tapctl_resources.rc + ) +target_compile_options(tapctl PRIVATE + -D_UNICODE + -UNTDDI_VERSION + -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) +target_link_libraries(tapctl + advapi32.lib ole32.lib setupapi.lib) +if (MINGW) + target_compile_options(tapctl PRIVATE -municode) + target_link_options(tapctl PRIVATE -municode) +endif () diff --git a/src/tapctl/Makefile.am b/src/tapctl/Makefile.am index 3896351b..fe8ab2a5 100644 --- a/src/tapctl/Makefile.am +++ b/src/tapctl/Makefile.am @@ -33,6 +33,10 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ $(TAP_CFLAGS) +EXTRA_DIST = \ + CMakeLists.txt \ + tapctl.exe.manifest + if WIN32 sbin_PROGRAMS = tapctl tapctl_CFLAGS = \ From patchwork Tue Jun 20 13:53:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3252 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp3721936dyk; Tue, 20 Jun 2023 06:54:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ixMvajjAmezcUgrQuTcIJ8lHmLodOpjwa/J6/c6JUnrhvFbqR6gUi3kP7EnCB1R4s0koH X-Received: by 2002:a17:902:e5d0:b0:1af:babd:7b84 with SMTP id u16-20020a170902e5d000b001afbabd7b84mr14803689plf.41.1687269266320; Tue, 20 Jun 2023 06:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687269266; cv=none; d=google.com; s=arc-20160816; b=dbqEs/6KM+dO/rBNoUillG1YxFXhrQQjKgCHEr8mo6CdUuSJT7lR4YXb6pxWa2BGgC C18nVSa8UFWmcZL3qVd3LCdH05LTlxZIeKpTrbOZO2yJMiLNIGO9sIpYQLLKgQl07gb6 C2qnWrJvfO1g+hHbtLT5PZrjfgnIXHIahUOa29hD4F1sSfldqXhLHz4GLxJdAL9DowSz Blo9WI6ALnl3dfHJ9jur8Qn9A7mMNC9HUaPqIkejd2R/hp6a3PpogLFEUlBC+i5vG8Hw CQ/BkmmFydDYPYMqb7CYy3J8Eij/N9PVj9XgQtKvfx+5f1pSecht2iG1ujWJjlq3eUqG AKKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=IbtYAD6vEEmcUx4+mgHg54zJb0sb7AOIIy1ZOX9XcHs=; b=SFIi1Pyn+PlB2MnFTtBK/fNNZOyALfbLTg0WhXXtABd2iT+AfOz36wx/2KX4JiMQy1 HMhsNiJgpEh6y7e6C0QW0IcTgodwYineadCxWTUe8qXDmGuUWMegnbR4zcddHqxUbsz5 w/xF4SXYy8enaF2HoRf5ZRlXpaRr61EYRQfG4bRFcXmpZdstga4zwPE3+vmsdpm8uvnT BDjfK/DQZkql858yeY21/r5BRgx3htdHl+CR7IqjF5nEJzgBSPczLB1r0y8oLJ9xSVVp f8KP9Bu3OCntxFojcEMYDZ2kKNCcit9atvVkHTbdQUkM4QUIVXbAhGUP64OUougwhBus 1XIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lPVmjh3m; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=SLAATeNJ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=dzJKB79l; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id q5-20020a170902eb8500b001b3f35a694esi1938405plg.83.2023.06.20.06.54.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 06:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lPVmjh3m; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=SLAATeNJ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=dzJKB79l; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qBbnW-0007Ix-Mt; Tue, 20 Jun 2023 13:53:31 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qBbnU-0007Ii-GM for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WZxSBHxsFTl2kEymh8EoACLb8kAbFThW2RwYRfWv8O0=; b=lPVmjh3mz+sxtNiWwTgsizyEyt e8IvMwH0QE2smcKmw4msZcyC6KqchkP9SO0jj5YPphcWtkobWLihbQb0nUVf64pIEZWjw1mLaOPBz tK1UP0JajSA4i4O+Mq8VNbY2hn4iXcgJj8l8f8eYae0dPZO8Zo73cOg5lFGoPa0nNxuw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WZxSBHxsFTl2kEymh8EoACLb8kAbFThW2RwYRfWv8O0=; b=SLAATeNJKderon+SuTttQiRsbx 1kpzSkZYXEOb/B3ckyFvCURrhLk7SD01oYa+i0UB7013UTWXmkCBjIWL+HLWsz4Dm4RA1UBTFrZ5G 14iqcojKOzpm3XSuH6VqZ/wNlnfrqvaVMyclYwEts/RodO9J5/sW4dC3wZZHnJiRnvg0=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qBbnQ-009n5w-KD for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:29 +0000 Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Qlp4T4BRRz9sqP for ; Tue, 20 Jun 2023 15:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1687269193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WZxSBHxsFTl2kEymh8EoACLb8kAbFThW2RwYRfWv8O0=; b=dzJKB79lB/oByKma9idAnRDGJ5Nx6vjShF4nJYWbtsOYaGS+F6HmvzEOOYZs15gpkEq1aB p3tVJkYVsyCh37wnFoIdoGrICYP+lhVE8TnvIP09Ynv/WD+P7pJEI63y8qEALcb9TXMPRS vixhKUisxie1zYFrMnf9cBfdMFziOmAf6R5JPxReeYlbCdyEet5ezWjs9VRNzOp1rBPGBR RsayYes2sejcGBDEnKzvZ03UzDQPbKOtSzfUKXvH4aSWySAy0s/Joby3o6APlysOXOr2U1 nv+Axdn2jTYrS7Kow9jtcciHEUB2q6bXWg79fJlr+8a2oYmU+hSwL7WxMsAoxw== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Tue, 20 Jun 2023 15:53:08 +0200 Message-Id: <20230620135310.94455-4-frank@lichtenheld.com> In-Reply-To: <20230620135310.94455-1-frank@lichtenheld.com> References: <20230509111205.138997-1-frank@lichtenheld.com> <20230620135310.94455-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Completely replaced by the CMake build system now. v3: - rebase on top of my dist fixes Change-Id: I807cffa40f18faa1adec4e15e84c032877a2b92e Signed-off-by: Frank Lichtenheld --- .gitignore | 11 - Makefile.am | 7 +- build/Makefile.am | 2 - build/msvc/Makefile.am | [...] Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1qBbnQ-009n5w-KD Subject: [Openvpn-devel] [PATCH v3 3/5] Remove all traces of the previous MSVC build system X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1765414860554207790?= X-GMAIL-MSGID: =?utf-8?q?1769230058210739631?= Completely replaced by the CMake build system now. v3: - rebase on top of my dist fixes Change-Id: I807cffa40f18faa1adec4e15e84c032877a2b92e Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- .gitignore | 11 - Makefile.am | 7 +- build/Makefile.am | 2 - build/msvc/Makefile.am | 15 - build/msvc/msvc-generate/Makefile.am | 20 - build/msvc/msvc-generate/Makefile.mak | 67 --- build/msvc/msvc-generate/git-version.py | 75 --- build/msvc/msvc-generate/msvc-generate.js | 118 ----- .../msvc/msvc-generate/msvc-generate.vcxproj | 158 ------ build/msvc/msvc-generate/version.m4.in | 3 - config-msvc-version.h.in | 14 - config-msvc.h | 93 ---- configure.ac | 2 - openvpn.sln | 107 ---- src/compat/Debug.props | 21 - src/compat/Makefile.am | 6 - src/compat/PropertySheet.props | 29 -- src/compat/Release.props | 26 - src/compat/compat-basename.c | 2 - src/compat/compat-daemon.c | 2 - src/compat/compat-dirname.c | 2 - src/compat/compat-gettimeofday.c | 2 - src/compat/compat-strsep.c | 2 - src/compat/compat.vcxproj | 179 ------- src/openvpn/Makefile.am | 4 +- src/openvpn/argv.c | 2 - src/openvpn/auth_token.c | 2 - src/openvpn/base64.c | 2 - src/openvpn/block_dns.c | 2 - src/openvpn/buffer.c | 2 - src/openvpn/clinat.c | 2 - src/openvpn/comp-lz4.c | 2 - src/openvpn/comp.c | 2 - src/openvpn/compstub.c | 2 - src/openvpn/console.c | 2 - src/openvpn/console_builtin.c | 2 - src/openvpn/crypto.c | 2 - src/openvpn/crypto_mbedtls.c | 2 - src/openvpn/crypto_openssl.c | 2 - src/openvpn/cryptoapi.c | 2 - src/openvpn/dco.c | 2 - src/openvpn/dco_freebsd.c | 2 - src/openvpn/dco_linux.c | 2 - src/openvpn/dco_win.c | 2 - src/openvpn/dhcp.c | 2 - src/openvpn/dns.c | 2 - src/openvpn/env_set.c | 2 - src/openvpn/error.c | 2 - src/openvpn/event.c | 2 - src/openvpn/fdmisc.c | 2 - src/openvpn/forward.c | 2 - src/openvpn/fragment.c | 2 - src/openvpn/gremlin.c | 2 - src/openvpn/helper.c | 2 - src/openvpn/httpdigest.c | 2 - src/openvpn/init.c | 2 - src/openvpn/interval.c | 2 - src/openvpn/list.c | 2 - src/openvpn/lladdr.c | 2 - src/openvpn/lzo.c | 2 - src/openvpn/manage.c | 2 - src/openvpn/mbuf.c | 2 - src/openvpn/misc.c | 2 - src/openvpn/mroute.c | 2 - src/openvpn/mss.c | 2 - src/openvpn/mstats.c | 2 - src/openvpn/mtcp.c | 2 - src/openvpn/mtu.c | 2 - src/openvpn/mudp.c | 2 - src/openvpn/multi.c | 2 - src/openvpn/networking_freebsd.c | 2 - src/openvpn/networking_iproute2.c | 2 - src/openvpn/networking_sitnl.c | 2 - src/openvpn/ntlm.c | 2 - src/openvpn/occ.c | 2 - src/openvpn/openssl_compat.h | 2 - src/openvpn/openvpn.c | 2 - src/openvpn/openvpn.vcxproj | 470 ------------------ src/openvpn/openvpn_win32_resources.rc | 2 - src/openvpn/options.c | 2 - src/openvpn/options_util.c | 2 - src/openvpn/otime.c | 2 - src/openvpn/packet_id.c | 2 - src/openvpn/perf.c | 2 - src/openvpn/ping.c | 2 - src/openvpn/pkcs11.c | 2 - src/openvpn/pkcs11_mbedtls.c | 2 - src/openvpn/pkcs11_openssl.c | 2 - src/openvpn/platform.c | 2 - src/openvpn/plugin.c | 2 - src/openvpn/pool.c | 2 - src/openvpn/proto.c | 2 - src/openvpn/proxy.c | 2 - src/openvpn/ps.c | 2 - src/openvpn/push.c | 2 - src/openvpn/reflect_filter.c | 2 - src/openvpn/reliable.c | 2 - src/openvpn/route.c | 2 - src/openvpn/run_command.c | 2 - src/openvpn/schedule.c | 2 - src/openvpn/session_id.c | 2 - src/openvpn/shaper.c | 2 - src/openvpn/sig.c | 2 - src/openvpn/socket.c | 2 - src/openvpn/socks.c | 2 - src/openvpn/ssl.c | 2 - src/openvpn/ssl_mbedtls.c | 2 - src/openvpn/ssl_ncp.c | 2 - src/openvpn/ssl_openssl.c | 2 - src/openvpn/ssl_pkt.c | 2 - src/openvpn/ssl_util.c | 2 - src/openvpn/ssl_verify.c | 2 - src/openvpn/ssl_verify_mbedtls.c | 2 - src/openvpn/ssl_verify_openssl.c | 2 - src/openvpn/status.c | 2 - src/openvpn/tls_crypt.c | 2 - src/openvpn/tun.c | 2 - src/openvpn/vcpkg.json | 15 - src/openvpn/vlan.c | 2 - src/openvpn/win32-util.c | 2 - src/openvpn/win32.c | 2 - src/openvpn/xkey_helper.c | 2 - src/openvpn/xkey_provider.c | 2 - src/openvpnmsica/Makefile.am | 6 - src/openvpnmsica/dllmain.c | 2 - src/openvpnmsica/msica_arg.c | 2 - src/openvpnmsica/msiex.c | 2 - src/openvpnmsica/openvpnmsica-Debug.props | 14 - src/openvpnmsica/openvpnmsica-Release.props | 15 - src/openvpnmsica/openvpnmsica.c | 2 - src/openvpnmsica/openvpnmsica.props | 17 - src/openvpnmsica/openvpnmsica.vcxproj | 208 -------- src/openvpnmsica/openvpnmsica_resources.rc | 2 - src/openvpnserv/Makefile.am | 3 - src/openvpnserv/openvpnserv.vcxproj | 229 --------- src/openvpnserv/openvpnserv_resources.rc | 2 - src/openvpnserv/service.h | 2 - src/tapctl/Makefile.am | 5 - src/tapctl/main.c | 2 - src/tapctl/tap.c | 2 - src/tapctl/tapctl.props | 18 - src/tapctl/tapctl.vcxproj | 205 -------- src/tapctl/tapctl_resources.rc | 2 - tests/unit_tests/openvpn/mock_msg.c | 2 - tests/unit_tests/openvpn/pkey_test_utils.c | 2 - tests/unit_tests/openvpn/test_auth_token.c | 2 - tests/unit_tests/openvpn/test_buffer.c | 2 - tests/unit_tests/openvpn/test_crypto.c | 2 - tests/unit_tests/openvpn/test_cryptoapi.c | 2 - tests/unit_tests/openvpn/test_misc.c | 2 - tests/unit_tests/openvpn/test_ncp.c | 2 - tests/unit_tests/openvpn/test_packet_id.c | 2 - tests/unit_tests/openvpn/test_pkcs11.c | 2 - tests/unit_tests/openvpn/test_pkt.c | 2 - tests/unit_tests/openvpn/test_provider.c | 2 - tests/unit_tests/openvpn/test_tls_crypt.c | 2 - 156 files changed, 2 insertions(+), 2408 deletions(-) delete mode 100644 build/msvc/Makefile.am delete mode 100644 build/msvc/msvc-generate/Makefile.am delete mode 100644 build/msvc/msvc-generate/Makefile.mak delete mode 100644 build/msvc/msvc-generate/git-version.py delete mode 100644 build/msvc/msvc-generate/msvc-generate.js delete mode 100644 build/msvc/msvc-generate/msvc-generate.vcxproj delete mode 100644 build/msvc/msvc-generate/version.m4.in delete mode 100644 config-msvc-version.h.in delete mode 100644 config-msvc.h delete mode 100644 openvpn.sln delete mode 100644 src/compat/Debug.props delete mode 100644 src/compat/PropertySheet.props delete mode 100644 src/compat/Release.props delete mode 100644 src/compat/compat.vcxproj delete mode 100644 src/openvpn/openvpn.vcxproj delete mode 100644 src/openvpn/vcpkg.json delete mode 100644 src/openvpnmsica/openvpnmsica-Debug.props delete mode 100644 src/openvpnmsica/openvpnmsica-Release.props delete mode 100644 src/openvpnmsica/openvpnmsica.props delete mode 100644 src/openvpnmsica/openvpnmsica.vcxproj delete mode 100644 src/openvpnserv/openvpnserv.vcxproj delete mode 100644 src/tapctl/tapctl.props delete mode 100644 src/tapctl/tapctl.vcxproj diff --git a/.gitignore b/.gitignore index 658f57e5..ed03aaa9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,13 +10,7 @@ *.idb *.suo *.ncb -*.vcproj.* -*.vcxproj.user -*.sln.cache *.log -Release -Debug -Win32-Output out .vs .deps @@ -45,11 +39,7 @@ m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -vcpkg_installed -msvc-env-local.bat -config-msvc-local.h -config-msvc-version.h doc/openvpn-examples.5 doc/openvpn-examples.5.html doc/openvpn.8 @@ -61,7 +51,6 @@ distro/systemd/*.service sample/sample-keys/sample-ca/ vendor/cmocka_build vendor/dist -build/msvc/msvc-generate/version.m4 tests/t_client.sh tests/t_client-*-20??????-??????/ diff --git a/Makefile.am b/Makefile.am index 9bdbe7ea..24c47ae9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -69,12 +69,7 @@ dist_noinst_DATA = \ PORTS \ README.dco.md \ README.ec \ - README.wolfssl \ - openvpn.sln - -dist_noinst_HEADERS = \ - config-msvc.h \ - config-msvc-version.h.in + README.wolfssl config-version.h: @CONFIGURE_GIT_CHFILES="`GIT_DIR=\"$(top_srcdir)/.git\" $(GIT) diff-files --name-status -r --ignore-submodules --quiet -- || echo \"+\"`"; \ diff --git a/build/Makefile.am b/build/Makefile.am index a914d572..e7cc4d8b 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -13,5 +13,3 @@ MAINTAINERCLEANFILES = \ EXTRA_DIST = \ ltrc.inc - -SUBDIRS = msvc diff --git a/build/msvc/Makefile.am b/build/msvc/Makefile.am deleted file mode 100644 index df3b41f3..00000000 --- a/build/msvc/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2002-2023 OpenVPN Inc -# Copyright (C) 2006-2012 Alon Bar-Lev -# - -MAINTAINERCLEANFILES = \ - $(srcdir)/Makefile.in - -SUBDIRS = msvc-generate diff --git a/build/msvc/msvc-generate/Makefile.am b/build/msvc/msvc-generate/Makefile.am deleted file mode 100644 index fe13b370..00000000 --- a/build/msvc/msvc-generate/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2002-2023 OpenVPN Inc -# Copyright (C) 2006-2012 Alon Bar-Lev -# - -MAINTAINERCLEANFILES = \ - $(srcdir)/Makefile.in - -dist_noinst_DATA = \ - git-version.py \ - msvc-generate.vcxproj \ - Makefile.mak \ - msvc-generate.js \ - version.m4.in diff --git a/build/msvc/msvc-generate/Makefile.mak b/build/msvc/msvc-generate/Makefile.mak deleted file mode 100644 index 91907420..00000000 --- a/build/msvc/msvc-generate/Makefile.mak +++ /dev/null @@ -1,67 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2002-2023 OpenVPN Inc -# Copyright (C) 2008-2012 Alon Bar-Lev -# Copyright (C) 2022-2022 Lev Stipakov -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -CONFIG=$(SOLUTIONDIR)/version.m4 - -INPUT_MSVC_VER=$(SOLUTIONDIR)/config-msvc-version.h.in -OUTPUT_MSVC_VER=$(SOLUTIONDIR)/config-msvc-version.h - -INPUT_PLUGIN=$(SOLUTIONDIR)/include/openvpn-plugin.h.in -OUTPUT_PLUGIN=$(SOLUTIONDIR)/include/openvpn-plugin.h - -INPUT_PLUGIN_CONFIG=version.m4.in -OUTPUT_PLUGIN_CONFIG=version.m4 - -INPUT_MAN=$(SOLUTIONDIR)/doc/openvpn.8.rst -OUTPUT_MAN=$(SOLUTIONDIR)/doc/openvpn.8.html - -OUTPUT_MSVC_GIT_CONFIG=$(SOLUTIONDIR)/config-version.h - -all: $(OUTPUT_MSVC_VER) $(OUTPUT_PLUGIN) $(OUTPUT_MAN) $(OUTPUT_MSVC_GIT_CONFIG) - -$(OUTPUT_MSVC_VER): $(INPUT_MSVC_VER) $(CONFIG) - cscript //nologo msvc-generate.js --config="$(CONFIG)" --input="$(INPUT_MSVC_VER)" --output="$(OUTPUT_MSVC_VER)" - -$(OUTPUT_PLUGIN_CONFIG): $(INPUT_PLUGIN_CONFIG) - cscript //nologo msvc-generate.js --config="$(CONFIG)" --input="$(INPUT_PLUGIN_CONFIG)" --output="$(OUTPUT_PLUGIN_CONFIG)" - -$(OUTPUT_PLUGIN): $(INPUT_PLUGIN) $(OUTPUT_PLUGIN_CONFIG) - cscript //nologo msvc-generate.js --config="$(OUTPUT_PLUGIN_CONFIG)" --input="$(INPUT_PLUGIN)" --output="$(OUTPUT_PLUGIN)" - -$(OUTPUT_MAN): $(INPUT_MAN) - -FOR /F %i IN ('where rst2html.py') DO python %i "$(INPUT_MAN)" "$(OUTPUT_MAN)" - -# Force regeneration because we can't detect whether it is outdated -$(OUTPUT_MSVC_GIT_CONFIG): FORCE - python git-version.py $(SOLUTIONDIR) - -FORCE: - -clean: - -del "$(OUTPUT_MSVC_VER)" - -del "$(OUTPUT_PLUGIN)" - -del "$(OUTPUT_PLUGIN_CONFIG)" - -del "$(OUTPUT_MAN)" - -del "$(OUTPUT_MSVC_GIT_CONFIG)" diff --git a/build/msvc/msvc-generate/git-version.py b/build/msvc/msvc-generate/git-version.py deleted file mode 100644 index c2b44527..00000000 --- a/build/msvc/msvc-generate/git-version.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2022-2023 OpenVPN Inc -# Copyright (C) 2022-2022 Lev Stipakov -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -import os -import sys -import subprocess - -def run_command(args): - sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) - o, _ = sp.communicate() - return o.decode("utf-8")[:-1] - -def get_branch_commit_id(): - commit_id = run_command(["git", "rev-parse", "--short=16", "HEAD"]) - if not commit_id: - raise - branch = run_command(["git", "describe", "--exact-match"]) - if not branch: - # this returns an array like ["master"] or ["release", "2.6"] - branch = run_command(["git", "rev-parse", "--symbolic-full-name", "HEAD"]).split("/")[2:] - if not branch: - branch = ["none"] - branch = "/" .join(branch) # handle cases like release/2.6 - - return branch, commit_id - -def main(): - try: - branch, commit_id = get_branch_commit_id() - except: - branch, commit_id = "unknown", "unknown" - - prev_content = "" - - name = os.path.join("%s" % (sys.argv[1] if len(sys.argv) > 1 else "."), "config-version.h") - try: - with open(name, "r") as f: - prev_content = f.read() - except: - # file doesn't exist - pass - - content = "#define CONFIGURE_GIT_REVISION \"%s/%s\"\n" % (branch, commit_id) - content += "#define CONFIGURE_GIT_FLAGS \"\"\n" - - if prev_content != content: - print("Writing %s" % name) - with open(name, "w") as f: - f.write(content) - else: - print("Content of %s hasn't changed" % name) - -if __name__ == "__main__": - main() diff --git a/build/msvc/msvc-generate/msvc-generate.js b/build/msvc/msvc-generate/msvc-generate.js deleted file mode 100644 index d9564cfd..00000000 --- a/build/msvc/msvc-generate/msvc-generate.js +++ /dev/null @@ -1,118 +0,0 @@ -/* - * msvc-generate.js - string transformation - * - * Copyright (C) 2008-2012 Alon Bar-Lev - * - * BSD License - * ============ - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * o Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * o Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * o Neither the name of the Alon Bar-Lev nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -var ForReading = 1; -var fso = new ActiveXObject("Scripting.FileSystemObject"); -var input = "nul"; -var output = "nul"; -var files = new Array(); -var env = new Array(); - -function initialize() { - for (var i=0;i - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {8598C2C8-34C4-47A1-99B0-7C295A890615} - msvc-generate - MakeFileProj - 10.0 - - - - Makefile - v143 - - - Makefile - v143 - - - Makefile - v143 - - - Makefile - v143 - - - Makefile - v143 - - - Makefile - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - nmake -f Makefile.mak all - nmake -f Makefile.mak all - nmake -f Makefile.mak all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean - nmake -f Makefile.mak clean - nmake -f Makefile.mak clean - config-msvc-version.h - config-msvc-version.h - config-msvc-version.h - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - $(NMakeIncludeSearchPath) - $(NMakeIncludeSearchPath) - $(NMakeIncludeSearchPath) - $(NMakeForcedIncludes) - $(NMakeForcedIncludes) - $(NMakeForcedIncludes) - $(NMakeAssemblySearchPath) - $(NMakeAssemblySearchPath) - $(NMakeAssemblySearchPath) - $(NMakeForcedUsingAssemblies) - $(NMakeForcedUsingAssemblies) - $(NMakeForcedUsingAssemblies) - $(Configuration)\ - $(Configuration)\ - nmake -f Makefile.mak all - nmake -f Makefile.mak all - nmake -f Makefile.mak all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean all - nmake -f Makefile.mak clean - nmake -f Makefile.mak clean - nmake -f Makefile.mak clean - config-msvc-version.h - config-msvc-version.h - config-msvc-version.h - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - $(NMakeIncludeSearchPath) - $(NMakeIncludeSearchPath) - $(NMakeIncludeSearchPath) - $(NMakeForcedIncludes) - $(NMakeForcedIncludes) - $(NMakeForcedIncludes) - $(NMakeAssemblySearchPath) - $(NMakeAssemblySearchPath) - $(NMakeAssemblySearchPath) - $(NMakeForcedUsingAssemblies) - $(NMakeForcedUsingAssemblies) - $(NMakeForcedUsingAssemblies) - - - - - - - - - - - \ No newline at end of file diff --git a/build/msvc/msvc-generate/version.m4.in b/build/msvc/msvc-generate/version.m4.in deleted file mode 100644 index cbb4fef1..00000000 --- a/build/msvc/msvc-generate/version.m4.in +++ /dev/null @@ -1,3 +0,0 @@ -define([OPENVPN_VERSION_MAJOR], [@PRODUCT_VERSION_MAJOR@]) -define([OPENVPN_VERSION_MINOR], [@PRODUCT_VERSION_MINOR@]) -define([OPENVPN_VERSION_PATCH], [@PRODUCT_VERSION_PATCH@]) diff --git a/config-msvc-version.h.in b/config-msvc-version.h.in deleted file mode 100644 index 59ca654a..00000000 --- a/config-msvc-version.h.in +++ /dev/null @@ -1,14 +0,0 @@ -#define PACKAGE_NAME "@PRODUCT_NAME@" -#define PACKAGE_STRING "@PRODUCT_NAME@ @PRODUCT_VERSION_MAJOR@.@PRODUCT_VERSION_MINOR@@PRODUCT_VERSION_PATCH@" -#define PACKAGE_TARNAME "@PRODUCT_TARNAME@" -#define PACKAGE "@PRODUCT_TARNAME@" -#define PRODUCT_VERSION_MAJOR "@PRODUCT_VERSION_MAJOR@" -#define PRODUCT_VERSION_MINOR "@PRODUCT_VERSION_MINOR@" -#define PRODUCT_VERSION_PATCH "@PRODUCT_VERSION_PATCH@" -#define PACKAGE_VERSION "@PRODUCT_VERSION_MAJOR@.@PRODUCT_VERSION_MINOR@@PRODUCT_VERSION_PATCH@" -#define PRODUCT_VERSION "@PRODUCT_VERSION_MAJOR@.@PRODUCT_VERSION_MINOR@@PRODUCT_VERSION_PATCH@" -#define PRODUCT_BUGREPORT "@PRODUCT_BUGREPORT@" -#define OPENVPN_VERSION_RESOURCE @PRODUCT_VERSION_RESOURCE@ -#define TAP_WIN_COMPONENT_ID "@PRODUCT_TAP_WIN_COMPONENT_ID@" -#define TAP_WIN_MIN_MAJOR @PRODUCT_TAP_WIN_MIN_MAJOR@ -#define TAP_WIN_MIN_MINOR @PRODUCT_TAP_WIN_MIN_MINOR@ diff --git a/config-msvc.h b/config-msvc.h deleted file mode 100644 index a3c687ed..00000000 --- a/config-msvc.h +++ /dev/null @@ -1,93 +0,0 @@ -#include - -#define CONFIGURE_DEFINES "N/A" - -#define ENABLE_PF 1 -#define ENABLE_CRYPTO_OPENSSL 1 -#define ENABLE_FRAGMENT 1 -#define ENABLE_HTTP_PROXY 1 -#define ENABLE_LZO 1 -#define ENABLE_LZ4 1 -#define ENABLE_MANAGEMENT 1 -#define ENABLE_PKCS11 1 -#define ENABLE_PLUGIN 1 -#define ENABLE_PORT_SHARE 1 -#define ENABLE_SOCKS 1 - -#define HAVE_FCNTL_H 1 -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRERROR 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_SYSTEM 1 -#define HAVE_TIME 1 -#define HAVE_TIME_H 1 -#define HAVE_WINDOWS_H 1 -#define HAVE_WINSOCK2_H 1 -#define HAVE_WS2TCPIP_H 1 -#define HAVE_IO_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_LZO_LZO1X_H 1 -#define HAVE_LZO_LZOUTIL_H 1 -#define HAVE_VERSIONHELPERS_H 1 - -#define HAVE_ACCESS 1 -#define HAVE_CHDIR 1 -#define HAVE_CHSIZE 1 -#define HAVE_IN_PKTINFO 1 - -#define HAVE_OPENSSL_ENGINE 1 -#define HAVE_EXPORT_KEYING_MATERIAL 1 - -#define HAVE_DIINSTALLDEVICE 1 - -#ifndef __cplusplus -#define inline __inline -#endif - -#define TARGET_WIN32 1 -#define TARGET_ALIAS "Windows-MSVC" - -#define HAVE_DECL_SO_MARK 0 - -#define strncasecmp strnicmp -#define strcasecmp _stricmp - -#if _MSC_VER<1900 -#define snprintf _snprintf -#endif - -#if _MSC_VER < 1800 -#define strtoull strtoul -#endif - -#define in_addr_t uint32_t -#define ssize_t SSIZE_T - -#define S_IRUSR _S_IREAD -#define S_IWUSR _S_IWRITE -#define S_IRGRP (S_IRUSR >> 3) -#define R_OK 4 -#define W_OK 2 -#define X_OK 1 -#define F_OK 0 - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGUSR1 10 -#define SIGUSR2 12 -#define SIGTERM 15 - -#include -typedef uint16_t in_port_t; - -#ifdef HAVE_CONFIG_MSVC_LOCAL_H -#include -#endif - -#define ENABLE_DCO 1 - -#define HAVE_CONFIG_VERSION_H 1 diff --git a/configure.ac b/configure.ac index 50bccc72..5ab1d0df 100644 --- a/configure.ac +++ b/configure.ac @@ -1504,8 +1504,6 @@ AC_SUBST([TEST_CFLAGS]) AC_CONFIG_FILES([ Makefile build/Makefile - build/msvc/Makefile - build/msvc/msvc-generate/Makefile distro/Makefile distro/systemd/Makefile doc/Makefile diff --git a/openvpn.sln b/openvpn.sln deleted file mode 100644 index 3485bc94..00000000 --- a/openvpn.sln +++ /dev/null @@ -1,107 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31205.134 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvpnserv", "src\openvpnserv\openvpnserv.vcxproj", "{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvpn", "src\openvpn\openvpn.vcxproj", "{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-generate", "build\msvc\msvc-generate\msvc-generate.vcxproj", "{8598C2C8-34C4-47A1-99B0-7C295A890615}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compat", "src\compat\compat.vcxproj", "{4B2E2719-E661-45D7-9203-F6F456B22F19}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tapctl", "src\tapctl\tapctl.vcxproj", "{A06436E7-D576-490D-8BA0-0751D920334A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvpnmsica", "src\openvpnmsica\openvpnmsica.vcxproj", "{D41AA9D6-B818-476E-992E-0E16EB86BEE2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|ARM64.Build.0 = Debug|ARM64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|Win32.Build.0 = Debug|Win32 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|x64.ActiveCfg = Debug|x64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Debug|x64.Build.0 = Debug|x64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|ARM64.ActiveCfg = Release|ARM64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|ARM64.Build.0 = Release|ARM64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|Win32.ActiveCfg = Release|Win32 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|Win32.Build.0 = Release|Win32 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|x64.ActiveCfg = Release|x64 - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}.Release|x64.Build.0 = Release|x64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|ARM64.Build.0 = Debug|ARM64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|Win32.ActiveCfg = Debug|Win32 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|Win32.Build.0 = Debug|Win32 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|x64.ActiveCfg = Debug|x64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Debug|x64.Build.0 = Debug|x64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|ARM64.ActiveCfg = Release|ARM64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|ARM64.Build.0 = Release|ARM64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|Win32.ActiveCfg = Release|Win32 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|Win32.Build.0 = Release|Win32 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|x64.ActiveCfg = Release|x64 - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94}.Release|x64.Build.0 = Release|x64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|ARM64.Build.0 = Debug|ARM64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|Win32.ActiveCfg = Debug|Win32 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|Win32.Build.0 = Debug|Win32 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|x64.ActiveCfg = Debug|x64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Debug|x64.Build.0 = Debug|x64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|ARM64.ActiveCfg = Release|ARM64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|ARM64.Build.0 = Release|ARM64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|Win32.ActiveCfg = Release|Win32 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|Win32.Build.0 = Release|Win32 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|x64.ActiveCfg = Release|x64 - {8598C2C8-34C4-47A1-99B0-7C295A890615}.Release|x64.Build.0 = Release|x64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|ARM64.Build.0 = Debug|ARM64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|Win32.ActiveCfg = Debug|Win32 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|Win32.Build.0 = Debug|Win32 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|x64.ActiveCfg = Debug|x64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Debug|x64.Build.0 = Debug|x64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|ARM64.ActiveCfg = Release|ARM64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|ARM64.Build.0 = Release|ARM64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|Win32.ActiveCfg = Release|Win32 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|Win32.Build.0 = Release|Win32 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|x64.ActiveCfg = Release|x64 - {4B2E2719-E661-45D7-9203-F6F456B22F19}.Release|x64.Build.0 = Release|x64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|ARM64.Build.0 = Debug|ARM64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|Win32.Build.0 = Debug|Win32 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|x64.ActiveCfg = Debug|x64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Debug|x64.Build.0 = Debug|x64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|ARM64.ActiveCfg = Release|ARM64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|ARM64.Build.0 = Release|ARM64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|Win32.ActiveCfg = Release|Win32 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|Win32.Build.0 = Release|Win32 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|x64.ActiveCfg = Release|x64 - {A06436E7-D576-490D-8BA0-0751D920334A}.Release|x64.Build.0 = Release|x64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|ARM64.Build.0 = Debug|ARM64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|Win32.Build.0 = Debug|Win32 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|x64.ActiveCfg = Debug|x64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Debug|x64.Build.0 = Debug|x64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|ARM64.ActiveCfg = Release|ARM64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|ARM64.Build.0 = Release|ARM64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|Win32.ActiveCfg = Release|Win32 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|Win32.Build.0 = Release|Win32 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|x64.ActiveCfg = Release|x64 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EB3CE5D3-415C-46F0-96AB-E1CDA287AB6D} - EndGlobalSection -EndGlobal diff --git a/src/compat/Debug.props b/src/compat/Debug.props deleted file mode 100644 index 31bb9d91..00000000 --- a/src/compat/Debug.props +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - <_PropertySheetDisplayName>compat-Debug - true - - - - EnableFastChecks - Disabled - _DEBUG;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - EditAndContinue - - - - \ No newline at end of file diff --git a/src/compat/Makefile.am b/src/compat/Makefile.am index a42ec39c..f5de4515 100644 --- a/src/compat/Makefile.am +++ b/src/compat/Makefile.am @@ -12,12 +12,6 @@ MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in -EXTRA_DIST = \ - compat.vcxproj \ - PropertySheet.props \ - Debug.props \ - Release.props - noinst_LTLIBRARIES = libcompat.la libcompat_la_SOURCES = \ diff --git a/src/compat/PropertySheet.props b/src/compat/PropertySheet.props deleted file mode 100644 index 57f6995f..00000000 --- a/src/compat/PropertySheet.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - $(SolutionDir)$(Platform)-Output\$(Configuration)\ - <_PropertySheetDisplayName>compat - - - - Level3 - WIN32;$(CPPFLAGS);%(PreprocessorDefinitions) - $(SolutionDir);$(SolutionDir)include;%(AdditionalIncludeDirectories) - - - true - - - - $(SOLUTIONDIR) - - - - - $(SOLUTIONDIR) - true - - - \ No newline at end of file diff --git a/src/compat/Release.props b/src/compat/Release.props deleted file mode 100644 index 50eaa8de..00000000 --- a/src/compat/Release.props +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - <_PropertySheetDisplayName>compat-Release - false - - - - true - true - MultiThreadedDLL - ProgramDatabase - NDEBUG;%(PreprocessorDefinitions) - Guard - - - true - true - - - - \ No newline at end of file diff --git a/src/compat/compat-basename.c b/src/compat/compat-basename.c index e66e225d..abb4f49e 100644 --- a/src/compat/compat-basename.c +++ b/src/compat/compat-basename.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifndef HAVE_BASENAME diff --git a/src/compat/compat-daemon.c b/src/compat/compat-daemon.c index 460b9e99..aebb8f4e 100644 --- a/src/compat/compat-daemon.c +++ b/src/compat/compat-daemon.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifndef HAVE_DAEMON diff --git a/src/compat/compat-dirname.c b/src/compat/compat-dirname.c index c1523d99..c131dee8 100644 --- a/src/compat/compat-dirname.c +++ b/src/compat/compat-dirname.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif diff --git a/src/compat/compat-gettimeofday.c b/src/compat/compat-gettimeofday.c index 0dc74607..69843fb4 100644 --- a/src/compat/compat-gettimeofday.c +++ b/src/compat/compat-gettimeofday.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifndef HAVE_GETTIMEOFDAY diff --git a/src/compat/compat-strsep.c b/src/compat/compat-strsep.c index 6db013f7..fbad98d3 100644 --- a/src/compat/compat-strsep.c +++ b/src/compat/compat-strsep.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifndef HAVE_STRSEP diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj deleted file mode 100644 index 9fcfd6c6..00000000 --- a/src/compat/compat.vcxproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {4B2E2719-E661-45D7-9203-F6F456B22F19} - compat - Win32Proj - 10.0 - - - - StaticLibrary - MultiByte - true - v143 - Spectre - - - StaticLibrary - MultiByte - true - v143 - Spectre - - - StaticLibrary - MultiByte - true - v143 - Spectre - - - StaticLibrary - MultiByte - v143 - Spectre - - - StaticLibrary - MultiByte - v143 - Spectre - - - StaticLibrary - MultiByte - v143 - Spectre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - true - - - true - - - true - - - true - - - true - - - true - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - $(SolutionDir);%(AdditionalIncludeDirectories) - _LIB;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - {8598c2c8-34c4-47a1-99b0-7c295a890615} - false - - - - - - \ No newline at end of file diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index 2f979914..52deef85 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -15,9 +15,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in EXTRA_DIST = \ - openvpn.vcxproj \ - openvpn.manifest \ - vcpkg.json + openvpn.manifest AM_CPPFLAGS = \ -I$(top_srcdir)/include \ diff --git a/src/openvpn/argv.c b/src/openvpn/argv.c index cef0da9a..50083baf 100644 --- a/src/openvpn/argv.c +++ b/src/openvpn/argv.c @@ -29,8 +29,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/auth_token.c b/src/openvpn/auth_token.c index e4486eb0..6787ea7d 100644 --- a/src/openvpn/auth_token.c +++ b/src/openvpn/auth_token.c @@ -1,7 +1,5 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/base64.c b/src/openvpn/base64.c index 0ac65e99..a9c2f4c6 100644 --- a/src/openvpn/base64.c +++ b/src/openvpn/base64.c @@ -33,8 +33,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/block_dns.c b/src/openvpn/block_dns.c index 4af429be..05b2599c 100644 --- a/src/openvpn/block_dns.c +++ b/src/openvpn/block_dns.c @@ -25,8 +25,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/buffer.c b/src/openvpn/buffer.c index 7725438e..24f1ef26 100644 --- a/src/openvpn/buffer.c +++ b/src/openvpn/buffer.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/clinat.c b/src/openvpn/clinat.c index 514bd438..2b91f7b1 100644 --- a/src/openvpn/clinat.c +++ b/src/openvpn/clinat.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/comp-lz4.c b/src/openvpn/comp-lz4.c index e544a8dc..33a480cc 100644 --- a/src/openvpn/comp-lz4.c +++ b/src/openvpn/comp-lz4.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/comp.c b/src/openvpn/comp.c index 27b640ce..6e303694 100644 --- a/src/openvpn/comp.c +++ b/src/openvpn/comp.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/compstub.c b/src/openvpn/compstub.c index 496e60e5..adb1f28a 100644 --- a/src/openvpn/compstub.c +++ b/src/openvpn/compstub.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/console.c b/src/openvpn/console.c index bbdd59c5..5b367f23 100644 --- a/src/openvpn/console.c +++ b/src/openvpn/console.c @@ -25,8 +25,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/console_builtin.c b/src/openvpn/console_builtin.c index 4101feb8..b5264d8e 100644 --- a/src/openvpn/console_builtin.c +++ b/src/openvpn/console_builtin.c @@ -30,8 +30,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index 930f15a4..a77b5a13 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/crypto_mbedtls.c b/src/openvpn/crypto_mbedtls.c index cd43ee58..98cac60d 100644 --- a/src/openvpn/crypto_mbedtls.c +++ b/src/openvpn/crypto_mbedtls.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index f5372f85..b043bb95 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/cryptoapi.c b/src/openvpn/cryptoapi.c index 20b7d985..3b92e481 100644 --- a/src/openvpn/cryptoapi.c +++ b/src/openvpn/cryptoapi.c @@ -31,8 +31,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 308578b4..7c7eaac4 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -26,8 +26,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #if defined(ENABLE_DCO) diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index af7776bb..3ba1c817 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #if defined(ENABLE_DCO) && defined(TARGET_FREEBSD) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 2bfdf980..6737f354 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #if defined(ENABLE_DCO) && defined(TARGET_LINUX) diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 4b414efa..53f1523d 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -21,8 +21,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #if defined(_WIN32) diff --git a/src/openvpn/dhcp.c b/src/openvpn/dhcp.c index b9cd3c61..ac7f538c 100644 --- a/src/openvpn/dhcp.c +++ b/src/openvpn/dhcp.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/dns.c b/src/openvpn/dns.c index b7808db1..530e6d5e 100644 --- a/src/openvpn/dns.c +++ b/src/openvpn/dns.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/env_set.c b/src/openvpn/env_set.c index 79059141..97b011fb 100644 --- a/src/openvpn/env_set.c +++ b/src/openvpn/env_set.c @@ -26,8 +26,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/error.c b/src/openvpn/error.c index 9a234e67..56addff7 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/event.c b/src/openvpn/event.c index fa5aee23..6b6f9514 100644 --- a/src/openvpn/event.c +++ b/src/openvpn/event.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/fdmisc.c b/src/openvpn/fdmisc.c index 3f74171b..3570ed4e 100644 --- a/src/openvpn/fdmisc.c +++ b/src/openvpn/fdmisc.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 5bffe07d..d8ad0d15 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/fragment.c b/src/openvpn/fragment.c index 50391de2..974ebda1 100644 --- a/src/openvpn/fragment.c +++ b/src/openvpn/fragment.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/gremlin.c b/src/openvpn/gremlin.c index c77fc406..501d70cf 100644 --- a/src/openvpn/gremlin.c +++ b/src/openvpn/gremlin.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c index 7c219fdf..fa011ffb 100644 --- a/src/openvpn/helper.c +++ b/src/openvpn/helper.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/httpdigest.c b/src/openvpn/httpdigest.c index 6714ef94..5c255b22 100644 --- a/src/openvpn/httpdigest.c +++ b/src/openvpn/httpdigest.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/init.c b/src/openvpn/init.c index d358ad00..6fb6900d 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/interval.c b/src/openvpn/interval.c index 8308df4a..bde9dd99 100644 --- a/src/openvpn/interval.c +++ b/src/openvpn/interval.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/list.c b/src/openvpn/list.c index f65d8a8e..480f39d7 100644 --- a/src/openvpn/list.c +++ b/src/openvpn/list.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/lladdr.c b/src/openvpn/lladdr.c index ee677187..cc677b4b 100644 --- a/src/openvpn/lladdr.c +++ b/src/openvpn/lladdr.c @@ -4,8 +4,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index 848cb06a..19017802 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -27,8 +27,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 05358af4..d80f9ffd 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mbuf.c b/src/openvpn/mbuf.c index a44f8c3b..318b9eda 100644 --- a/src/openvpn/mbuf.c +++ b/src/openvpn/mbuf.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c index 774ea062..ce6e4fd9 100644 --- a/src/openvpn/misc.c +++ b/src/openvpn/misc.c @@ -25,8 +25,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index 2683b405..91af2b60 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mss.c b/src/openvpn/mss.c index 98d54068..816e65b6 100644 --- a/src/openvpn/mss.c +++ b/src/openvpn/mss.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mstats.c b/src/openvpn/mstats.c index 1e92b41e..04be449e 100644 --- a/src/openvpn/mstats.c +++ b/src/openvpn/mstats.c @@ -27,8 +27,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mtcp.c b/src/openvpn/mtcp.c index 6c56a260..62eb14b9 100644 --- a/src/openvpn/mtcp.c +++ b/src/openvpn/mtcp.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mtu.c b/src/openvpn/mtu.c index 2925b7fe..132f93c5 100644 --- a/src/openvpn/mtu.c +++ b/src/openvpn/mtu.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c index 8698aefc..81625ea5 100644 --- a/src/openvpn/mudp.c +++ b/src/openvpn/mudp.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 6fb9cff2..aad11b1d 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifdef HAVE_SYS_INOTIFY_H diff --git a/src/openvpn/networking_freebsd.c b/src/openvpn/networking_freebsd.c index 0633dce7..1c94756e 100644 --- a/src/openvpn/networking_freebsd.c +++ b/src/openvpn/networking_freebsd.c @@ -1,7 +1,5 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" #include "errlevel.h" diff --git a/src/openvpn/networking_iproute2.c b/src/openvpn/networking_iproute2.c index 0efeed0f..9d2351cd 100644 --- a/src/openvpn/networking_iproute2.c +++ b/src/openvpn/networking_iproute2.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #if defined(TARGET_LINUX) && defined(ENABLE_IPROUTE) diff --git a/src/openvpn/networking_sitnl.c b/src/openvpn/networking_sitnl.c index cb9a47c0..662e0e2d 100644 --- a/src/openvpn/networking_sitnl.c +++ b/src/openvpn/networking_sitnl.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifdef TARGET_LINUX diff --git a/src/openvpn/ntlm.c b/src/openvpn/ntlm.c index 20527d44..0cb0a32f 100644 --- a/src/openvpn/ntlm.c +++ b/src/openvpn/ntlm.c @@ -22,8 +22,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/occ.c b/src/openvpn/occ.c index 94b82e0f..8541f6ec 100644 --- a/src/openvpn/occ.c +++ b/src/openvpn/occ.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index 56b1dcf1..ffb64adf 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -36,8 +36,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "buffer.h" diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c index 1aaddcdf..348392e2 100644 --- a/src/openvpn/openvpn.c +++ b/src/openvpn/openvpn.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj deleted file mode 100644 index 97baf678..00000000 --- a/src/openvpn/openvpn.vcxproj +++ /dev/null @@ -1,470 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {29DF226E-4D4E-440F-ADAF-5829CFD4CA94} - openvpn - Win32Proj - 10.0 - - - - Application - true - NotSet - v143 - Spectre - - - Application - true - NotSet - v143 - Spectre - - - Application - true - NotSet - v143 - Spectre - - - Application - NotSet - v143 - Spectre - - - Application - NotSet - v143 - Spectre - - - Application - NotSet - v143 - Spectre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - false - - - false - - - false - - - false - - - false - - - false - - - true - arm64-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - arm64-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - x86-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - x86-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - x64-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - x64-windows-ovpn - --overlay-triplets=$(SolutionDir)contrib\vcpkg-triplets --overlay-ports=$(SolutionDir)contrib\vcpkg-ports - - - true - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Level2 - /ZH:SHA_256 %(AdditionalOptions) - true - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Level2 - /ZH:SHA_256 %(AdditionalOptions) - true - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Level2 - /ZH:SHA_256 %(AdditionalOptions) - true - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Guard - Level2 - /ZH:SHA_256 %(AdditionalOptions) - true - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - true - - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Guard - true - Level2 - /ZH:SHA_256 %(AdditionalOptions) - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - true - - - - - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) - %(UndefinePreprocessorDefinitions) - true - ..\compat;%(AdditionalIncludeDirectories) - Guard - Level2 - /ZH:SHA_256 %(AdditionalOptions) - true - - - - Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib - $(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories) - Console - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {8598c2c8-34c4-47a1-99b0-7c295a890615} - false - - - {4b2e2719-e661-45d7-9203-f6f456b22f19} - false - - - - - - - - - \ No newline at end of file diff --git a/src/openvpn/openvpn_win32_resources.rc b/src/openvpn/openvpn_win32_resources.rc index 1ea5f878..a843b1b2 100644 --- a/src/openvpn/openvpn_win32_resources.rc +++ b/src/openvpn/openvpn_win32_resources.rc @@ -1,7 +1,5 @@ #ifdef HAVE_CONFIG_H #include -#else -#include #endif #include diff --git a/src/openvpn/options.c b/src/openvpn/options.c index efddc589..90d85be4 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -29,8 +29,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifdef HAVE_CONFIG_VERSION_H #include "config-version.h" diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c index b071f37d..3660da06 100644 --- a/src/openvpn/options_util.c +++ b/src/openvpn/options_util.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/otime.c b/src/openvpn/otime.c index 0bbed81d..b28a90f9 100644 --- a/src/openvpn/otime.c +++ b/src/openvpn/otime.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.c index bb790f03..ef832488 100644 --- a/src/openvpn/packet_id.c +++ b/src/openvpn/packet_id.c @@ -32,8 +32,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/perf.c b/src/openvpn/perf.c index 5eb89265..ca4f810d 100644 --- a/src/openvpn/perf.c +++ b/src/openvpn/perf.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ping.c b/src/openvpn/ping.c index 25822c99..ccf9870a 100644 --- a/src/openvpn/ping.c +++ b/src/openvpn/ping.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/pkcs11.c b/src/openvpn/pkcs11.c index b6c3bf13..cfe6cf6d 100644 --- a/src/openvpn/pkcs11.c +++ b/src/openvpn/pkcs11.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/pkcs11_mbedtls.c b/src/openvpn/pkcs11_mbedtls.c index a286a231..7e4be144 100644 --- a/src/openvpn/pkcs11_mbedtls.c +++ b/src/openvpn/pkcs11_mbedtls.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/pkcs11_openssl.c b/src/openvpn/pkcs11_openssl.c index 9b0ab39f..7c07152c 100644 --- a/src/openvpn/pkcs11_openssl.c +++ b/src/openvpn/pkcs11_openssl.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index f6b856f3..32c4fe6b 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c index d662998e..b4d4a986 100644 --- a/src/openvpn/plugin.c +++ b/src/openvpn/plugin.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #ifdef HAVE_CONFIG_VERSION_H #include "config-version.h" diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c index 4af9bcb1..5ab0f95b 100644 --- a/src/openvpn/pool.c +++ b/src/openvpn/pool.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/proto.c b/src/openvpn/proto.c index 7a844074..cab60c3a 100644 --- a/src/openvpn/proto.c +++ b/src/openvpn/proto.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c index ed47eaa2..76e27cb4 100644 --- a/src/openvpn/proxy.c +++ b/src/openvpn/proxy.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ps.c b/src/openvpn/ps.c index 3609630a..4659e17d 100644 --- a/src/openvpn/ps.c +++ b/src/openvpn/ps.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 8e962719..ddfc28b4 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/reflect_filter.c b/src/openvpn/reflect_filter.c index cfe69a63..0db456bc 100644 --- a/src/openvpn/reflect_filter.c +++ b/src/openvpn/reflect_filter.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/reliable.c b/src/openvpn/reliable.c index 32b346b4..e7d4d5f8 100644 --- a/src/openvpn/reliable.c +++ b/src/openvpn/reliable.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 3798bc65..d18acd01 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -27,8 +27,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/run_command.c b/src/openvpn/run_command.c index 8c2a6d78..864b317d 100644 --- a/src/openvpn/run_command.c +++ b/src/openvpn/run_command.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/schedule.c b/src/openvpn/schedule.c index b0fca033..e1bc24ae 100644 --- a/src/openvpn/schedule.c +++ b/src/openvpn/schedule.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/session_id.c b/src/openvpn/session_id.c index 89c67efb..25c5faa8 100644 --- a/src/openvpn/session_id.c +++ b/src/openvpn/session_id.c @@ -32,8 +32,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/shaper.c b/src/openvpn/shaper.c index 6a0d7ddf..c65dec8f 100644 --- a/src/openvpn/shaper.c +++ b/src/openvpn/shaper.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c index 05c0054b..8b80aeb4 100644 --- a/src/openvpn/sig.c +++ b/src/openvpn/sig.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index fc643c1c..91a6d53d 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c index 2cf0cc9f..a29eb83a 100644 --- a/src/openvpn/socks.c +++ b/src/openvpn/socks.c @@ -31,8 +31,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 8641a51a..c975dbc6 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -36,8 +36,6 @@ */ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index 49989d94..81dd9069 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -29,8 +29,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_ncp.c b/src/openvpn/ssl_ncp.c index 22dbe210..dafaef12 100644 --- a/src/openvpn/ssl_ncp.c +++ b/src/openvpn/ssl_ncp.c @@ -37,8 +37,6 @@ */ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 65b36d1c..0b310de3 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_pkt.c b/src/openvpn/ssl_pkt.c index 8b3391e7..afc5aab3 100644 --- a/src/openvpn/ssl_pkt.c +++ b/src/openvpn/ssl_pkt.c @@ -22,8 +22,6 @@ */ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_util.c b/src/openvpn/ssl_util.c index e12ed3d8..bca6eed0 100644 --- a/src/openvpn/ssl_util.c +++ b/src/openvpn/ssl_util.c @@ -22,8 +22,6 @@ */ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 1b589f1a..90416b69 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_verify_mbedtls.c b/src/openvpn/ssl_verify_mbedtls.c index e3437f74..a1ddf8d0 100644 --- a/src/openvpn/ssl_verify_mbedtls.c +++ b/src/openvpn/ssl_verify_mbedtls.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_openssl.c index e24ce4e4..3194c232 100644 --- a/src/openvpn/ssl_verify_openssl.c +++ b/src/openvpn/ssl_verify_openssl.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/status.c b/src/openvpn/status.c index 737f340b..0cb44083 100644 --- a/src/openvpn/status.c +++ b/src/openvpn/status.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index 88b2d6d7..c97f9257 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 4ef390ad..d1fd6def 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -31,8 +31,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/vcpkg.json b/src/openvpn/vcpkg.json deleted file mode 100644 index 0afd802c..00000000 --- a/src/openvpn/vcpkg.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", - "name": "openvpn", - "version": "2.6", - "dependencies": [ - { - "name": "openssl", - "features": ["tools"] - }, - "tap-windows6", - "lzo", - "lz4", - "pkcs11-helper" - ] -} diff --git a/src/openvpn/vlan.c b/src/openvpn/vlan.c index 25100428..0bb7abc8 100644 --- a/src/openvpn/vlan.c +++ b/src/openvpn/vlan.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/win32-util.c b/src/openvpn/win32-util.c index 32f7a00b..81e504a4 100644 --- a/src/openvpn/win32-util.c +++ b/src/openvpn/win32-util.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 25da54ab..156ee746 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -28,8 +28,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index ee9677ab..40839f28 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpn/xkey_provider.c b/src/openvpn/xkey_provider.c index b0f414f6..db316feb 100644 --- a/src/openvpn/xkey_provider.c +++ b/src/openvpn/xkey_provider.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/src/openvpnmsica/Makefile.am b/src/openvpnmsica/Makefile.am index d68a0089..dc53f758 100644 --- a/src/openvpnmsica/Makefile.am +++ b/src/openvpnmsica/Makefile.am @@ -22,12 +22,6 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in -EXTRA_DIST = \ - openvpnmsica.vcxproj \ - openvpnmsica.props \ - openvpnmsica-Debug.props \ - openvpnmsica-Release.props - AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat diff --git a/src/openvpnmsica/dllmain.c b/src/openvpnmsica/dllmain.c index 7cff41ac..1bf3d564 100644 --- a/src/openvpnmsica/dllmain.c +++ b/src/openvpnmsica/dllmain.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include "openvpnmsica.h" diff --git a/src/openvpnmsica/msica_arg.c b/src/openvpnmsica/msica_arg.c index ad6968f2..d1eb4046 100644 --- a/src/openvpnmsica/msica_arg.c +++ b/src/openvpnmsica/msica_arg.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include "msica_arg.h" diff --git a/src/openvpnmsica/msiex.c b/src/openvpnmsica/msiex.c index 3ea2c1ac..78017eb3 100644 --- a/src/openvpnmsica/msiex.c +++ b/src/openvpnmsica/msiex.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include "msiex.h" diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props deleted file mode 100644 index 43532cfe..00000000 --- a/src/openvpnmsica/openvpnmsica-Debug.props +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - MultiThreadedDebug - - - - \ No newline at end of file diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props deleted file mode 100644 index 47727b35..00000000 --- a/src/openvpnmsica/openvpnmsica-Release.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - MultiThreaded - Guard - - - - \ No newline at end of file diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index 06c9789d..e5312d69 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include /* Must be included _before_ */ diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props deleted file mode 100644 index 1091c9f4..00000000 --- a/src/openvpnmsica/openvpnmsica.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - lib$(ProjectName) - - - - _WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions) - - - Windows - - - - \ No newline at end of file diff --git a/src/openvpnmsica/openvpnmsica.vcxproj b/src/openvpnmsica/openvpnmsica.vcxproj deleted file mode 100644 index c9154b37..00000000 --- a/src/openvpnmsica/openvpnmsica.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - 15.0 - {D41AA9D6-B818-476E-992E-0E16EB86BEE2} - Win32Proj - openvpnmsica - 10.0 - - - - DynamicLibrary - true - v143 - Unicode - true - Spectre - - - DynamicLibrary - true - v143 - Unicode - Spectre - - - DynamicLibrary - true - v143 - Unicode - Spectre - - - DynamicLibrary - false - v143 - true - Unicode - true - Spectre - - - DynamicLibrary - false - v143 - true - Unicode - Spectre - - - DynamicLibrary - false - v143 - true - Unicode - Spectre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - - true - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - true - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - /ZH:SHA_256 %(AdditionalOptions) - true - - - - - - - - - - - - - - - - - - - - - - - - {8598c2c8-34c4-47a1-99b0-7c295a890615} - false - - - - - - \ No newline at end of file diff --git a/src/openvpnmsica/openvpnmsica_resources.rc b/src/openvpnmsica/openvpnmsica_resources.rc index d7c14ded..e30c8a14 100644 --- a/src/openvpnmsica/openvpnmsica_resources.rc +++ b/src/openvpnmsica/openvpnmsica_resources.rc @@ -19,8 +19,6 @@ #ifdef HAVE_CONFIG_H #include -#else -#include #endif #include diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am index 4c0ac40c..d8ba4eb0 100644 --- a/src/openvpnserv/Makefile.am +++ b/src/openvpnserv/Makefile.am @@ -13,9 +13,6 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in -EXTRA_DIST = \ - openvpnserv.vcxproj - AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj deleted file mode 100644 index db3a446d..00000000 --- a/src/openvpnserv/openvpnserv.vcxproj +++ /dev/null @@ -1,229 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {9C91EE0B-817D-420A-A1E6-15A5A9D98BAD} - openvpnserv - Win32Proj - 10.0 - - - - Application - Unicode - true - v143 - Spectre - - - Application - Unicode - true - v143 - Spectre - - - Application - Unicode - true - v143 - Spectre - - - Application - Unicode - v143 - Spectre - - - Application - Unicode - v143 - Spectre - - - Application - Unicode - v143 - Spectre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - true - - - true - - - true - - - true - - - true - - - true - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - true - - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - true - - - - - ..\openvpn;..\compat;%(AdditionalIncludeDirectories) - _CONSOLE;%(PreprocessorDefinitions) - true - /ZH:SHA_256 %(AdditionalOptions) - - - - legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies) - Console - - - - - - - - - - - - - - - - - - - - - {8598c2c8-34c4-47a1-99b0-7c295a890615} - false - - - - - - \ No newline at end of file diff --git a/src/openvpnserv/openvpnserv_resources.rc b/src/openvpnserv/openvpnserv_resources.rc index 4ea453e1..ddd0cb83 100644 --- a/src/openvpnserv/openvpnserv_resources.rc +++ b/src/openvpnserv/openvpnserv_resources.rc @@ -1,7 +1,5 @@ #ifdef HAVE_CONFIG_H #include -#else -#include #endif #include diff --git a/src/openvpnserv/service.h b/src/openvpnserv/service.h index fc5ecdaf..d38a6652 100644 --- a/src/openvpnserv/service.h +++ b/src/openvpnserv/service.h @@ -31,8 +31,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include diff --git a/src/tapctl/Makefile.am b/src/tapctl/Makefile.am index fe8ab2a5..69ea1611 100644 --- a/src/tapctl/Makefile.am +++ b/src/tapctl/Makefile.am @@ -22,11 +22,6 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in -EXTRA_DIST = \ - tapctl.vcxproj \ - tapctl.props \ - tapctl.exe.manifest - AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/src/compat diff --git a/src/tapctl/main.c b/src/tapctl/main.c index d76d553c..a946c2ca 100644 --- a/src/tapctl/main.c +++ b/src/tapctl/main.c @@ -21,8 +21,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include "tap.h" diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c index 44fcdde5..5ae80443 100644 --- a/src/tapctl/tap.c +++ b/src/tapctl/tap.c @@ -20,8 +20,6 @@ #ifdef HAVE_CONFIG_H #include -#elif defined(_MSC_VER) -#include #endif #include "tap.h" diff --git a/src/tapctl/tapctl.props b/src/tapctl/tapctl.props deleted file mode 100644 index 0257b9ff..00000000 --- a/src/tapctl/tapctl.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - false - - - - _CONSOLE;_WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions) - ..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories) - - - Console - - - - \ No newline at end of file diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj deleted file mode 100644 index 6311d7fd..00000000 --- a/src/tapctl/tapctl.vcxproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - 15.0 - {A06436E7-D576-490D-8BA0-0751D920334A} - Win32Proj - tapctl - 10.0 - - - - Application - true - v143 - Unicode - true - Spectre - - - Application - true - v143 - Unicode - Spectre - - - Application - true - v143 - Unicode - Spectre - - - Application - false - v143 - true - Unicode - true - Spectre - - - Application - false - v143 - true - Unicode - Spectre - - - Application - false - v143 - true - Unicode - Spectre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - true - - - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - - - true - - - true - /ZH:SHA_256 %(AdditionalOptions) - - - - - - - - - - - - - - - - - - {8598c2c8-34c4-47a1-99b0-7c295a890615} - false - - - - - - - - - \ No newline at end of file diff --git a/src/tapctl/tapctl_resources.rc b/src/tapctl/tapctl_resources.rc index fc65b5a6..c49f82d8 100644 --- a/src/tapctl/tapctl_resources.rc +++ b/src/tapctl/tapctl_resources.rc @@ -19,8 +19,6 @@ #ifdef HAVE_CONFIG_H #include -#else -#include #endif #include diff --git a/tests/unit_tests/openvpn/mock_msg.c b/tests/unit_tests/openvpn/mock_msg.c index a6fcf432..d74efaa1 100644 --- a/tests/unit_tests/openvpn/mock_msg.c +++ b/tests/unit_tests/openvpn/mock_msg.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include diff --git a/tests/unit_tests/openvpn/pkey_test_utils.c b/tests/unit_tests/openvpn/pkey_test_utils.c index 7adaf33f..dd0a7311 100644 --- a/tests/unit_tests/openvpn/pkey_test_utils.c +++ b/tests/unit_tests/openvpn/pkey_test_utils.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif diff --git a/tests/unit_tests/openvpn/test_auth_token.c b/tests/unit_tests/openvpn/test_auth_token.c index 57e98f54..d96984f4 100644 --- a/tests/unit_tests/openvpn/test_auth_token.c +++ b/tests/unit_tests/openvpn/test_auth_token.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_buffer.c b/tests/unit_tests/openvpn/test_buffer.c index bff50567..8232f927 100644 --- a/tests/unit_tests/openvpn/test_buffer.c +++ b/tests/unit_tests/openvpn/test_buffer.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tests/unit_tests/openvpn/test_crypto.c index aec4e049..58eebc04 100644 --- a/tests/unit_tests/openvpn/test_crypto.c +++ b/tests/unit_tests/openvpn/test_crypto.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/openvpn/test_cryptoapi.c index 2150b77c..008f41c0 100644 --- a/tests/unit_tests/openvpn/test_cryptoapi.c +++ b/tests/unit_tests/openvpn/test_cryptoapi.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvpn/test_misc.c index 5a8978d0..43ae96b6 100644 --- a/tests/unit_tests/openvpn/test_misc.c +++ b/tests/unit_tests/openvpn/test_misc.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_tests/openvpn/test_ncp.c index 0e52ea24..72a1c3b0 100644 --- a/tests/unit_tests/openvpn/test_ncp.c +++ b/tests/unit_tests/openvpn/test_ncp.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_packet_id.c b/tests/unit_tests/openvpn/test_packet_id.c index 9b653a8b..90c67acd 100644 --- a/tests/unit_tests/openvpn/test_packet_id.c +++ b/tests/unit_tests/openvpn/test_packet_id.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_tests/openvpn/test_pkcs11.c index df5f8c7e..235cc43f 100644 --- a/tests/unit_tests/openvpn/test_pkcs11.c +++ b/tests/unit_tests/openvpn/test_pkcs11.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_pkt.c b/tests/unit_tests/openvpn/test_pkt.c index 736f1317..5a53f702 100644 --- a/tests/unit_tests/openvpn/test_pkt.c +++ b/tests/unit_tests/openvpn/test_pkt.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_provider.c b/tests/unit_tests/openvpn/test_provider.c index 255067c7..335fca2d 100644 --- a/tests/unit_tests/openvpn/test_provider.c +++ b/tests/unit_tests/openvpn/test_provider.c @@ -24,8 +24,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/openvpn/test_tls_crypt.c index 19ae29cc..8bed042f 100644 --- a/tests/unit_tests/openvpn/test_tls_crypt.c +++ b/tests/unit_tests/openvpn/test_tls_crypt.c @@ -23,8 +23,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#elif defined(_MSC_VER) -#include "config-msvc.h" #endif #include "syshead.h" From patchwork Tue Jun 20 13:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3251 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp3721905dyk; Tue, 20 Jun 2023 06:54:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CExQHE/51NRiKq1AAv4LgUdHtoNxIiqF7IN7NknXp5fUMPTFseLblJcrk6VsLwohvrbrQ X-Received: by 2002:a92:c70f:0:b0:33e:5ea2:bd00 with SMTP id a15-20020a92c70f000000b0033e5ea2bd00mr3767458ilp.17.1687269262886; Tue, 20 Jun 2023 06:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687269262; cv=none; d=google.com; s=arc-20160816; b=zzklubic41JU+mVlDtCwoHqcBKvoh+9dKONcyr9Thz6PdX/QdOlXlDn0XmN6VpTGlG BDJm+WVjK5gP6BxsGv4DYRJ7tHbIFsQM6jGidVL2itmShR+iGAwiaFdFS/uD3lo3b42j mH7F2QbkuU0kKeSudHpBxuxcXSprUsR1fPktn8tdJucVU/E9FI4t0otRhGuIG0095XYn Yhjpb5NT1UFBQqt7Ad6ghFLWVW76SQHPZcKvq4yj+Zesu4abAXDoizPGBObwFmbl5/YH SmEHmEBlzdrubWorxFoCogCcCS2ORNoQ8NxUS19Ix5DQtCVYOJ/kz9XC81beB3uAOfWq QMwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=NtUcv4tUbccC2FJ0JRqtW7AR1ojwYj71yTO6i+JqfCE=; b=NMsykCOWYJjlfjp6LWHe4IG0augssb8F+ULDv+tR5hOFa8QxJK5yxRmmtSWj1sU043 AErSD3n6BXCZqaGpzdsBT2S+pgxYLosYqYBSnI4p1ngmkBVT32qGgzl2G84ZM01pWKFx AAu89SETDFum5k4giO4JTGC96g3y5WA8XYPyL49iDBC+DyFxx4h/7eIWz3Ce36jcCoV9 l5quOd+aboACljYyOtLIAc8fGaLCMmuBeRVqRM6bvfP4Kut92LyIaaCVwN9N7Z3I06TK e9dZUwsk0G3N9aruAjiFUhnh9l/spnwOvxNI93xwEGdUYLXu1oqNHG5rTGPc6n6/NHcy 0Tsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VxY1SCt3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GhYsLhHr; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=i8Onnuez; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id bs66-20020a632845000000b00543a89c95c2si1594678pgb.207.2023.06.20.06.54.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 06:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=VxY1SCt3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GhYsLhHr; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=i8Onnuez; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qBbnV-0001pb-JT; Tue, 20 Jun 2023 13:53:29 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qBbnT-0001pS-Bj for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NHyK7sfMWJ6LCMCPO/Q/eobqMxj+e82AVPysM0ebnws=; b=VxY1SCt3Yjb9vpl3U4LShRgJHf PdCMz0MjLQffTAub5mnsUq2UH3lFRp+Yaf2luE8msC6IIRFL1clxLoYF5+AeRPEzPfSilBf6ruaZe Vpmy35dLcbamXkApDIZtnkM7HH3UyfuAJUKPjdd+da4cEvETRvzZHyUyeK9A8r7e0Wh4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=NHyK7sfMWJ6LCMCPO/Q/eobqMxj+e82AVPysM0ebnws=; b=GhYsLhHreUjn5eIZC2+3PmY50l gmRMxFd7qPQqtQN7BgdCqtmMIWvPrSX1+g4wZ5Dz97yHsCSjrAJzb63wnvmthvXO3DP92gcUEwiaA 6SIbB7dLEUfnu5TXusHo8YKZFLnnBh+SBEhKfC/iie9ffm7L+QLvxvEEE0lYqWegWKfw=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qBbnQ-009n5x-KB for openvpn-devel@lists.sourceforge.net; Tue, 20 Jun 2023 13:53:27 +0000 Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Qlp4T5yFNz9sqq for ; Tue, 20 Jun 2023 15:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1687269193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NHyK7sfMWJ6LCMCPO/Q/eobqMxj+e82AVPysM0ebnws=; b=i8OnnuezVZsM6sBYcKqdspIyJXV1pog9D4CvyJmofj04hh5mHz6NjdK+hOGoVCsDxTrvSp Eq+n569f5M+JK25dPtDN7mbLyR0Ha0RUVx7wRd6VUqhrUXONLMt/W1GujCCkhUrHIJgiOa 2hVjGzGicE0N4oS3UoJzMP8tcZwRs3kqLZgI3/WQvJOUZFXbj28GghgH82r0qVYYTCwPsb W4ydcmID0SXaW42WK2lOgBpsiOhxFG/gztiHI7kuGkqOtlwIdneDA/TAByxlLkndTKXSck geO+lgtje7VvcnLuWftLS+DBdf5obDJZVHDq40kxblOUvedS7OjbSgxnxIB6RQ== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Tue, 20 Jun 2023 15:53:09 +0200 Message-Id: <20230620135310.94455-5-frank@lichtenheld.com> In-Reply-To: <20230620135310.94455-1-frank@lichtenheld.com> References: <20230509111205.138997-1-frank@lichtenheld.com> <20230620135310.94455-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: So that we get reproducible builds. Change-Id: Iffdd3ac5f266cc7d592ab678afc14c122acbb351 Signed-off-by: Frank Lichtenheld --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1qBbnQ-009n5x-KB Subject: [Openvpn-devel] [PATCH 4/5] CMake: Add /Brepro to MSVC link options X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1769230054750623795?= X-GMAIL-MSGID: =?utf-8?q?1769230054750623795?= So that we get reproducible builds. Change-Id: Iffdd3ac5f266cc7d592ab678afc14c122acbb351 Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bdbc87b8..3cbba5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ if (MSVC) "$<$:/Zi>" ) add_link_options( + /Brepro "$<$:/LTCG:incremental>" "$<$:/DEBUG:FULL>" "$<$:/OPT:REF>"