0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
Lev Stipakov
6f9f02ff9e cmake: use multiprocessor build for MSVC
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2024-08-08 14:43:11 +00:00
Frank Lichtenheld
9b8797fe5e
CMake: Refine CXX_STANDARD setting
- Set CXX_STANDARD_REQUIRED ON so that we error out early
  if CMake thinks that the compiler does not support the
  used standard.
- Set CXX_EXTENSIONS OFF so that we get less compiler
  specific behavior.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-11-08 21:10:21 +01:00
Frank Lichtenheld
268bf42b9e
CMake: accept all NEW policies in released CMake versions
Using the <max> argument to cmake_minimum_required will
set all policies up to <max> to NEW. We might need to
fix some issues arising from that, but this means that
modern CMake can already behave like it wants even with
leaving <min> so that we can support old distros (currently
Debian 10).

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-11-08 21:10:20 +01:00
Frank Lichtenheld
72275db1d5
client: Switch to UseSWIG instead of manual custom command
On modern CMake this gets us swig dependency management,
which should reduce problems for incremental builds.
Also it is just cleaner.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-11-08 21:10:19 +01:00
Frank Lichtenheld
bb61350ae5
CMake: replace FindPythonIntp with FindPython3
The earlier were deprecated since CMake 3.12.
Since CMake 3.27 this causes deprecation warnings.
Should be safe nowadays to require CMake 3.12.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-08-02 18:08:42 +02:00
Mark Deric
68f7d7ca27 Fix cmake for removal of proto.cpp
Removes building in the test/ssl directory from $TOP/CMakeLists.txt.
Removes the files under test/ssl that are rendered useless by the
$TOP/CMakeLists.txt change.

Signed-off-by: Mark Deric <jmark@openvpn.net>
2023-06-16 08:50:38 -07:00
Frank Lichtenheld
474de6c93f CMake: make doxygen generation work better
- Use CURRENT source and binary dir to make this work even
  if used as a sub-directory in another project.
- Make USE_MDFILE_AS_MAINPAGE actually work. It is only
  used when part of the INPUT and does not automatically
  add it to INPUT.
- Make sure CMake uses the latest version of README.rst
  by using configure_file instead of file(COPY).
- Improve EXCLUDE_PATTERNS.
- Add NUM_PROC_THREADS.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-04-24 14:32:31 +02:00
Frank Lichtenheld
4c81069564 CMake: move architecture detection closer to the actual executable
This makes it easier to see what is going on when looking at
individual CMakeLists.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-28 13:45:16 +01:00
Frank Lichtenheld
a9570cb780 CMake: support BUILD_TESTING option
This is important since it allows us to avoid
the JsonCPP dependency on non-Win/non-Apple
systems.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-28 12:30:30 +01:00
Frank Lichtenheld
50271ee02a CMake: small improvements
- Increase required version to 3.10. That is the version in
  Ubuntu Bionic and currently the oldest one we still want
  to support.
- Enable CTest for test target

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-28 12:30:30 +01:00
Arne Schwabe
e64f710ea6 Add cmake build configuration to build with address sanatiser
This allows an easy way to build with llvm address sanitiser feature using

    CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan

Reported-By: Trail of Bits (TOB-OVPN3-4)
2023-02-01 16:43:53 +01:00
David Sommerseth
0fae5639ac
build: Extend with a doxygen build target
If the ENABLE_DOXYGEN setting is enabled in CMake, it will look for the
local Doxygen installation and configure it.  The HTML output will be
located under doxygen/core.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-09-21 17:21:16 +02:00
Arne Schwabe
811c8c78ca
Use xkey provider for external keys with OpenSSL 3.0
The xkey provider has been originally implemented by Selva Nair for
OpenVPN 2.x and he has agreed to allow me to reuse the provider for
OpenSSL 3.0

This brings the xkey provider to OpenSSL to Openvpn3. The xkey_provider.c
file is kept as close as possible to the original OpenVPN 2 source.
From xkey_helper only the parts that were needed were picked up and used
in xkey.hpp.

This also changes the requests for clients wanting to implementing the
API, generally making them more work (adding PSS/PKCS1 padding and hashing)
but this is a good thing since especially external keys/HSM often do not
like doing raw signatures and often require to do padding/hashing themselves.

This commit also updates the test client's EPKI implementation to work
with the new requirements of the new API.

Since most of OpenVPN3's code base assumes having only one compilation unit
and the xkey_provider.c, this commit introduces the ENABLE_EXTERNAL_PKI
define. Only if this is set external key support is supported (and the
xkey_provider.c compilation unit needed).

This commit furthermore removes the pragma statements from extpki.hpp that
supressed warnings when being compiled with OpenSSL 3.0+ as this is header file
longer compiled with OpenSSL 3.0+. (Technically xkey is >= 3.0.1 but we have
no target that is OpenSSL 3.0.0).

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-06-08 22:41:36 +02:00
David Sommerseth
81441e8fa1 OpenVPN 3 Core library version 3.6.6
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmIqffMTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98oX4EACzfbeJuJcHMueL4Q54m8dqAVFxaev+
 kdm0KCjxuMlTB5ERtekJ7+6choeLdcs3K1nLV3jsDooXoNH0egdkNOEWX/cWnsdO
 WKtgz8a6oxx8c6H3Ow71tXIoRuJTQF/Tt9qUdjWu2TUpbbQSzC/h5onDP6+i5zct
 0qgySyDlB8yPnyBw8VIl+ZgKH0kacNGC3aO9+csQ1KPi1hlng9cUqycrX9m+zBxA
 g2hCXm92JtIeo2ti5RwoJVAqaeOmddAgLg5hHrX8LA37Bm4f+7eQEUM36CZnDoXr
 g4H/YHltn6W2dXpQKmYLIrhDVfWsLZ/fW7ASzzgfI2nwugmWsIgwXTtvsGLsocfX
 bbvI85HkTy8q6+oAHsC35IdHZcvpK/ekAda7zDSmpi7jRYBqB04vVTWuUu9O8HJt
 0wcwaTo5DzqYgGc461JFSw7j2lwIhCCfSnIBZP/CbCp+qzSu8f8y8VV0yAruAdby
 iLH7JltADDsfDTcUm5pTrzGUy0HmGhLmX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----

Merge OpenVPN 3 Core library version 3.6.6 changes
2022-03-11 00:16:55 +01:00
Arne Schwabe
9ad98bae8f Add building ovpncli swig library to cmake build
This also moves ovpncli.i to a proper place
2021-12-15 13:05:14 +01:00
Lev Stipakov
d31620d0c6
agent mac: move from common
Windows agent has been moved from common to core,
so for consistency move mac agent too.

Since agent and agent-enabled client depend on jsoncpp,
also move jsoncpp build scripts.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-06-10 23:06:24 +02:00
David Sommerseth
38f2a08d2b
cmake: Clean up duplications
The CMakeLists.txt settings from the project root directory are
inherited by the defined subdirectories automatically.

Also switch to a simpler way of setting the CMAKE_MODULE_PATH.
According to the CMake documentation, this variable is empty by
default [1] and should not need to pull in existing settings.

Finally remove the comment regarding CMake's use case, as we are
moving towards full CMake support for OpenVPN 3.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2021-04-22 12:54:26 +02:00
Lev Stipakov
1976c639c1
cmake: add Windows agent build
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-03 11:38:17 +02:00
Arne Schwabe
8f4da2ec62 Move CMAKE module path to root directory
This fixes the cmake build when using openvpn3 standonline

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-01-30 14:52:57 +01:00
Lev Stipakov
1c9834c50d win: replace msvc project files with cmake
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-01-29 23:24:54 +01:00
Arne Schwabe
4c089df991 Add cmake build file for proto
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-01-29 18:13:28 +01:00
Arne Schwabe
4c361ec4c3 Expand Unittest documentation 2019-12-03 11:04:15 +01:00
Arne Schwabe
d56e049ea4 Refactor dependencies to be in a cmake script
This allows the dependencies to be used by multiple parts of the project,
e.g. non public unit tests, ovpncli etc.

Building ovpncli demostrates this
2019-05-13 14:49:36 +02:00