0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
Lev Stipakov
cac1ebd859 vcpkg: link lzo statically
Having .dll for a single executable doesn't make
much sense. Static linking removes 117kb .dll
and grows .exe size by only 4kb.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220216134227.147-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23807.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2022-02-17 15:57:12 +01:00
Lev Stipakov
23e6aaef14 Load OpenSSL config on Windows from trusted location
Commits

 - 92535b6 ("contrib/vcpkg-ports: add openssl port with
             --no-autoload-config option set (CVE-2121-3606)")
 - 447cfb4 ("crypto_openssl.c: disable explicit initialization on Windows
             (CVE-2121-3606)")

disabled OpenSSL config loading functionality, which could be
exploited by loading config from untrusted locations.

This feature might be useful for some users. This brings it back
and sets OpenSSL enviroment variables

 OPENSSL_CONF, OPENSSL_ENGINES, OPENSSL_MODULES

which are used to load config, engines and modules, to a trusted location.
The location is constructed based on installation path, read from registry
on startup.
If installation path cannot be read, Windows\System32 is used as a
fallback.

While on it, remove unused "bool impersonate_as_system();" declaration.

Trac: #1296

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20211119015548.687-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23248.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-11-24 10:46:38 +01:00
Lev Stipakov
7e33127d56 contrib/vcpkg-ports: remove openssl port
MSFT has merged PR to vcpkg which
added OPENSSL_NO_AUTOLOAD_CONFIG option

  https://github.com/microsoft/vcpkg/pull/18389

This means that we don't need to have our own openssl port
and instead we just add

  set(OPENSSL_NO_AUTOLOAD_CONFIG ON)

to our custom triplets.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210628080832.510-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22616.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-08-01 19:08:00 +02:00
Lev Stipakov
56f775fe9d msvc: standalone building
This finally enables standalone MSVC building, without
dependency on openvpn-build/msvc. This makes MSVC build
process much simpler.

Dependencies are managed by vcpkg. To install dependencies, run:

  > vcpkg --overlay-ports=<openvpn>\contrib\vcpkg-ports
          --overlay-triplets=<openvpn>\contrib\vcpkg-triplets install
          lz4:x64-windows-ovpn lzo:x64-windows-ovpn
openssl-windows:x64-windows-ovpn pkcs11-helper:x64-windows-ovpn
tap-windows6:x64-windows-ovpn

To build for other arch, use x86-windows-ovpn or arm64-windows-ovpn.
Custom triplets are defines so that lz4 is linked statically and
other libraries dynamically.

Since we don't have CMake support yet, we cannot use vcpkg manifest
mode, since it doesn't work with overlay ports
(https://github.com/microsoft/vcpkg/issues/12289),
therefore this one-time manual dependency installation is required.

While on it, bump msvc-generate project target version to VS2019 and
cleanup leftovers from compat.vcxproj.filters.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210514045704.686-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22389.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-06-15 10:52:51 +02:00