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

244 Commits

Author SHA1 Message Date
Heiko Hund
3936778c38 virtual d'tors: use '= default' instead of empty body
Signed-off-by: Heiko Hund <heiko@openvpn.net>
2024-08-13 02:05:05 +02:00
Heiko Hund
8c8e96e138 streamline overriding virtual function syntax
In the code base three different syntaxes for overriding virtual member
functions could be found:

  1) virtual ... override
  2) virtual ...
  3) ... override

This converts all of them to the third syntax, as recommended by the ISO
C++ core guidelines in C.128

Signed-off-by: Heiko Hund <heiko@openvpn.net>
2024-08-13 02:01:24 +02:00
Arne Schwabe
b43851c7a0 Disable swig warnings for ClangCL
Swig under windows add a lot of code that clang does not like, so disable those warning

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2024-07-29 13:40:30 +00:00
Arne Schwabe
dca41905a5
Allow disabling TLS 1.3 in certcheck to more easily debug problems
Jira: OVPN3-1216
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2024-06-25 19:06:31 +02:00
Charlie Vigue
75d9d0fae5 Add certificate to EvalConfig
Clients need access to the server VPN ca for whitelisting reasons
so it is now available inside the EvalConfig structure. Implemented
the change and added a unit test for same.

Signed-off-by: Charlie Vigue <charlie.vigue@openvpn.net>
2024-05-30 15:27:29 +00:00
Arne Schwabe
d554fdcd8e Properly implement certcheck using EPKI
This also moves some of the reasonsibility from ClientProto to
OpenVPNClient. This plays better with the EPKI implementation and also
does not break the idea of the current certcheck implementation as we now
just give the certcheck in client protocol a preconfigured SSL Config instead
of all the certificates individually.
2024-05-28 10:48:07 +00:00
Arne Schwabe
0cafed2016 Allow the EPKI API to properly use the epki alias to distinguish certs
The implementation would previously return the alias the client library
requested to use but would not allow to have multiple different
external aliases be correctly used. This adds supports to have the
correct alias being used as part of the signature callback.
2024-05-28 10:48:07 +00:00
Charlie Vigue
075688e180 Implement certcheck used by the appcontrol feature
The AppControl feature provides an internal communications channel that
is described in detail in the relevant commits that implement it. This
change adds two intrinsic app control 'protocols' to the list of
supported handlers in the client. The new protocols are:

- cxa1: This is a request for the client to begin a TLS handshake via
the app control channel.
- cck1: This is the protocol that allows the exchange of the requested
TLS handshake data.

The 'cxa1' handler parses the request and initiates the handshake from
the client. This handshake is exchanged via the 'cck1' protocol and
serves to prove to the server that the client has access to the required
private key.

Signed-off-by: Charlie Vigue <charlie.vigue@openvpn.com>
2024-05-17 09:18:18 +00:00
Lev Stipakov
e34094e30d Refactor reauthentication logic
The reauthentication logic differs from openvpn2
and the code is a bit hard to follow. Simplify
the code and make it behave like in openvpn2.

 - password is cached by default

 - password is purged when auth-nocache is presented in a local config or pushed

 - when AUTH_FAILED is received and we have no session-id, throw a fatal error

 - when AUTH_FAILED is received and user interaction is required for
   authentication (MFA), throw a fatal error

 - when AUTH_FAILED is received, user interaction is not required
   for authentication and either we have a cached password OR password is not
   needed, we reconnect.

Password is "needed" when non-empty password is provided.

User interaction is required for static/dynamic challenge and SAML.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2024-05-08 16:39:24 +00:00
David Sommerseth
149ec03864 OpenVPN 3 Core library version 3.8.5
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmYmR6wTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98rZPD/4vNyAZYSVN5HXO9SdrxCju/8VDxuDj
 0/CuS444NC4RKNLJIlorlLSi1zeL4fjuSRtEkLwB8QzCc3/sxEFFIqVk974zytMi
 ohBlNqISJTSUqugMZg1UfcySJSqHGaQfNfaiywSrQAe7hrCVPrUu+cAcXNsBeBPa
 fDOggL6K/7EVCwvZ5gcGUY0lw/LIriFkh40XD8LY+aYhGonPzDGnuQjcYHU48Hlp
 3ufsjLIQdLs4jCTmzSlURcXvaxi04o4WV+YOEGrUYSXeY8+6J4T8uKXqlMyoKQ+C
 w/m8Kgr5gQf/E020LYpWPoPWkoPrRRtBLvvXAighNEKMEtefSqxQtE1r/c/rMU12
 VeSX5LwJ3VRhCiZuTJD+08aRrGQNf+Fm6nswnyLw66bFGyIpPErEwhhbJsmPmaNN
 pOrbAxsAMwc/+jy0gqw7XFT/oDts+VN8WiYSRRaHfZ68lCvgf9AYirtygJy6oNYM
 WLTDOJjMwb42qBqyo6eYjos5yU57F5thV9M6qY5ycCIO0AIM0cFrRkZjNLF1pWS6
 6n8pwpPab29nUy3Ql3PZhW7t/4bhz0todfN7egHZrrvCkCOSQ/5DDWLLBI6ow9bM
 fXKB1sVjkNLPrHJ//5Hqh0GdO/Uc8GqdOIFngCnnjR3CS/ax+PZoAawCn1XbBpUW
 ddgSpAigLtFsLg==
 =3t/k
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmY03Y8THGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98sRwEACMzTmRreCO3jz456Q9gJS/kV1Ll/NB
 xOfEnhttxc19t+kjKL/AQOW3kfvP34uJUQdQAvjmp/HyJYGXQuNwGDW2/VD6aRaM
 e8agFKtKT6cGYPV3NoL3i4+hcl+ZIVnnVAQ+U7Pd9P8eAOzjALa53nAzx978Sfsc
 517M9V6M2dCAERtZYfTlUcM9Fi7055KsW8Ermna1qyRyA25F9ekVMSOMTvSzlUCa
 7W7OE0J2uJafyP4K5gGpmHZLrirEWSrtY3oOjHO0HAjur+Ir3XwcTnB9U4ACdVQV
 HYnIv3QzElQV0aGeWwqKir1i9WIefpZe28h+53UP8pTnx5C5uo+U03kNibyjDDRx
 fMxGa5fELyTMk6kttN6TtWcIbHeWTch6qzsvYJR1Exaqql3EEbRIerlsCL5ZM2TV
 JP04BWzJ7Hfz6qTS3dFUiFHfZw3ptPthE/3JiAYObIFE1YdQKYjwAKHXRjjdh1kT
 pq0ubqx9mX8OkgVZWNC9NDIZvZpdGFBn57wfG3TN29iR/J2WELsjhPOI3tMQAWMT
 ZqrDl45BciFUA2lVkZ7C9tgaGMR/nok/3bTksrNcM3h2DCE8Rt28giZwvtN2nSjq
 8ekT6jDs15WZd3kfVJHP4tb2MCh/IuP/8DPmUxW6jbg6tFJ+JqOSmD502pwZfxog
 gRbBXbdUqV9B3A==
 =nrJ0
 -----END PGP SIGNATURE-----

Merge OpenVPN 3 Core library version 3.8.5 to master

Signed-off-by: David Sommerseth <davids@openvpn.net>
2024-05-03 14:50:21 +02:00
Arne Schwabe
dc35bd8d07 Replacing logging in ssl context und proto context with new logger
This allows the test_proto.cpp to supress all the logging of this
class. This is also the only place in our project that actually uses
a non-default loglevel for this class. A lot of files were defining the
OPENVPN_LOG_SSL(x) macro to be what the also remove ssllog.hpp would do
anyway if it were not defined.

The removed debug_level field  only controlled the mssfix
logging and is now controlled by the general protocol logging instead.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2024-04-17 14:48:50 +00:00
Lev Stipakov
4f1f22159f
Improve handling of unknown options
A few minor changes:

 - add ORGANIZATION meta option to ignore list

 - remove excessive OVPN_ACCESS_SERVER_ prefix from NO_WEB meta option

 - Increase status message length from 256 to 2048 to be able to show
   the full list of unsupported options

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2024-03-22 21:25:48 +01:00
Frank Lichtenheld
61c0ab7f6b 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>
(cherry picked from commit 72275db1d5)
2024-03-07 00:29:36 +02:00
Frank Lichtenheld
ef3b290de6 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>
(cherry picked from commit bb61350ae5)
2024-03-07 00:29:36 +02:00
Frank Lichtenheld
8c007de79d client: Explicitely use int as socket type in SWIG
For some reason SWIG doesn't seem to pick this
up automatically from the typedefs.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2024-03-06 13:00:04 +01:00
David Sommerseth
bae10062b3
Merging in changes from OpenVPN 3 Core version 3.8.4
Signed-off-by: David Sommerseth <davids@openvpn.net>
2024-02-19 22:46:53 +01:00
Lev Stipakov
b4a400f6fe Improve handling of unknown options
Currently we error out on the first unsupported
option which belongs to the "fatal" category, such as
"removed deprecated option" or "Option allowed only to
be pushed by the server".

To improve user experice and allow application code
to display all problematic options and their categories,
collect options into a category->options map and then
serialize it into multiline string:

  cat1: opt1,opt2
  cat2: opt3

Introduce a new error code UNUSED_OPTIONS, which is
placed into ClientAPI::Status::status. The serialized
options map is placed into ClientAPI::Status::message.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2024-02-07 17:03:45 +02:00
Arne Schwabe
f1ac7e500f Allow a client to announce custom control channel support
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-12-13 16:51:22 +01:00
Arne Schwabe
e9ade86de7 Implement logic to send and receive custom control channel messages
This adds the capability to implement a custom app level protocol
that support message passing over the OpenVPN control channel.
The protocol is agnostic to the data that is transported over it
and the message splitting/reassmbly is handled transparently by the
OpenVPN library itself.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-12-13 16:51:22 +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
8f7fdd10ff
Use openvpn_io::detail::socket_type instead of "int"
On Linux those might be identical, but not on Windows.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-09-28 11:33:41 +02:00
Arne Schwabe
ff80eca4e5
Rename ProtoContextOptions to ProtoContextCompressOptions
This might have been used or intended to be used for more than compression
but currently it is only used for compression, so rename it accordingly.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-08-23 21:13:01 +02: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
Arne Schwabe
75dbf4b5d2 Rename generate_tun_builder_capture_event to camelcase
This makes this option have the same style as the other options in
the client config to ensure consistencyv

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-07-25 12:00:48 +02:00
Frank Lichtenheld
6585480389 ConfigCommon: do not include actual profile
This is not required in ClientConfigParsed, and actually makes
the object significantly bigger, due to the contained certificates.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-07-25 12:00:48 +02:00
Arne Schwabe
0c5e356075 Simplify client options classes
The current passing of client options is very confusing since it is
three classes that largely have the same attributes and the code is
copying them around between the classes.

Instead create a new base class that hold the settings that can be shared
between the classes and only parse/copy the settings that need special
handling. This might keep an extra copy of some settings around but in
constract greatly reduces the code complexity of the options handling.

Also move the check_dco_compatibility function to client options to
be able to avoid carrying around the dco_compatiblity flag.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-07-25 12:00:48 +02:00
Lev Stipakov
84cf8f45cd dco: check for options/config DCO compatibility
When parsing config, check DCO compatibility. Following
options break DCO compatibility:

 - http-proxy
 - compress
 - comp-lzo

Same for config settings:

 - non-preferred-algorithms
 - legacy-algorithms
 - proxyHost

DCO compatibility could be checked with

 - bool EvalConfig::dcoCompatible
 - std::string dcoIncompatibilityReason

If client nevertheless tries to connect, an exception
will be thrown:

  connect error: option_error: dco_compatibility: config/options are not
compatible with dco

Fixes OVPN3-960.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2023-05-08 13:51:34 +03:00
Arne Schwabe
48f5adce94
Ensure that tlsVersionMinOverride does not lower TLS version
This ensure that client that want to set a miminum level of TLS
version do not accidentially lower the version when the profile already
requires a higher version.

Also make the tls version enum an enum class for better type safety.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-03-29 23:14:15 +02:00
David Sommerseth
dde1574596
Reformatting source code to new coding style
This is the result after running 'clang-format -i' on all C++ files and
headers, with the defined formatting rules in .clang-format.

Only the openvpn/common/unicode-impl.hpp has been excluded, as that is
mostly a copy of an external project.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2023-01-18 19:24:15 +01:00
David Sommerseth
4996c38ed4
Merge lastest changes from Core v3.7.2 2022-12-14 17:34:29 +01:00
Arne Schwabe
aa3bcb8b3a
Fix route emulation not correctly working and being disabled
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-12-14 17:23:13 +01:00
David Sommerseth
8c94a8f774
copyright: Update to 2022
Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-09-29 12:00:26 +02:00
Arne Schwabe
26fad3a4f6 Allow to disable route exclusion emulation
This allows disabling the route emulation for Andorid API 33
(Tiramisu/API 33) or if the app implements its own emulation (ics-openvpn)

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-08-03 16:41:06 +02:00
Arne Schwabe
3710fa106a Implement pushable tun-mtu and tls-mtu-max
OpenVPN 3.x has the same approach/problem for buffer allocation for the
tunnel packets that OpenVPN 2.x uses. Buffers are allocated very early
in the setup, so resizing/reacting to different frame sizes is not
really possible without major refactoring.

Therefore we use the same approach as with OpenVPN 2.x and allow a
MTU of up to 1600 by default and require setting tun-mtu-max in the
configuration file to allow larger values and allocate larger buffers.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-13 16:44:31 +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
James Yonan
085836cea9 ovpn3 client: support a new client event containing the data from TunBuilderCapture::to_json()
The event is of type INFO_JSON and is formatted:

  TUN_BUILDER_CAPTURE:{...}

This info is useful to determine the properties of a
VPN client session such as VPN IPs, Gateway IPs,
and DNS resolvers, and can be directly used as
a VPN Connection Profile.

This patch also adds the

  cli --tbc <file>

option to write the TunBuilderCapture JSON to a file.

Signed-off-by: James Yonan <james@openvpn.net>
2022-05-13 19:09:09 -06:00
Frank Lichtenheld
dc328c2ab2 ovpncli: Fix unitialized class member
CID 10065 (#6 of 6): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member proto_version_override
is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-03-21 15:50:09 +01:00
Frank Lichtenheld
592b6c4604 cmake: create findswigdeps to reduce code duplication
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-03-16 13:02:19 +01:00
Lev Stipakov
77b0bae736 client/CMakeLists.txt: build swig library only on Windows x64 arch
Swig library build uses Python library which has the the same arch
as build machine arch, which in our case is always x64.

Building for other archs causes machine type conflicts.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-03-16 11:56:09 +01:00
Lev Stipakov
70d0f23305 client/CMakeLists.txt: don't use gcc-specific flags in Windows build
Commit 9ad98bae8f ("Add building ovpncli swig library to cmake build")
added GCC-specific compiler flags which are unknown on Windows.

Remove those flags from Windows build.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-03-16 11:56:09 +01:00
Frank Lichtenheld
5f12014ca1 client: Fix build with SWIG 3.0 and new GCC
We saw problems with this on our RHEL7 builds because
we upgraded gcc but not swig. Work-around the issue
for now until we can require SWIG 4.0.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-03-11 18:51:10 +01: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
 iLH7JltADDsfDTcUm5pTrzGUy0HmGhLmXQ40QAea8xNIWNiWrJ79utXl4wKrWROb
 fZiqdjwe3i7Zg4JUNNAO1sycLuLkuAqajSsFgBk02veRdJks8FLAuylWjMrYkvsW
 QAZNa1zmS7Fq/8DaREqNRa0/HYg2dzXnKn0VcVTtR+z2o4pPc0F4+OYj+sEeWCER
 1/qsuIaTrAnkfA==
 =ihW/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmIqhwcTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98k5+D/9YvIzHlA/YeJ8iGhx+YbdUjMYnwrs2
 FcIQXyEd9puVtipv1sjy1FTaaCW4Ky+515ZFl+njXSzYNA6NBUOIU64iQlU6ZzaQ
 EkG9PSQvddwK5wxOLMaorG2PvFZmPTyBd0HoQUE9l1OiW3dgWu9sKK5Nm+Zgh4o5
 8KA/4f2AOxkXY/PkHylOcGPz8zevXJ1sHoJCXMNd3vWmpJ8jLoEQpX5qsMZcJhNn
 Q8ArRTI3OUrBXK4AkgCoJO2Gf83S+ROzZMNGVlJayW/7qjNXKGR0F1RQnEbaj2me
 bawYa7rZQ0sl9sHW87QEW6QgCrMu1SbaQFvNFJzhhm1UpBLPbcFaTVl/j265ndtQ
 34WblEePQMuCMKHxMP0EvYcz9eRIXQgPgXGCa4IOletD2te4LuAyyoPphAbntCi4
 gb54byMcoeOUgcRNBC9VuKI3SBwSUMh2o2VazZuo7gNk7PYpM7lTPLTylTeu37/9
 H/Dg1Z/M31FhSE7wCh+JwtWDnpKalwhQYSU4ugXqJ4DquwH043ZmrZoTKucixWHy
 VhNbrBgqQdnb2bJLMTII1J4khsjnh2pAWIuBiekpAtGNef8CVi77OX9YeX/z/R3w
 6WZZrvGoePLdabXhESfNpzvNM9PgqGqgWKhQBs6oj9gA7I2uKEUXMyxm33AJIuV5
 CHOSjo6kpWN7Fw==
 =ONLf
 -----END PGP SIGNATURE-----

Merge OpenVPN 3 Core library version 3.6.6 changes
2022-03-11 00:16:55 +01:00
Frank Lichtenheld
f3f6f580b3 ovpncli: fix uninitialied value in config_templ (CID 11125)
CID 11125 (#1 of 1): Uninitialized scalar variable (UNINIT)
8. uninit_use_in_call: Using uninitialized value
config_templ.enableNonPreferredDCAlgorithms when calling Config.
flood.cpp:1320

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-02-21 13:23:06 +01:00
Arne Schwabe
39443bff46
Rename enableNonPreferredDCOAlgorithms to config.enableNonPreferredDCAlgorithms
This should be DC for data channel instead DCO for data channel offload.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-01-12 18:30:06 +01:00
Arne Schwabe
d0a9b61b4b
Do not allow SWEET32 vulnerable algorithms and MD4 without enableLegacyAlgorithm
With OpenSSL3, these algorithms are no longer allowed. With this change
we do the same regardless of the crypto library. Note that in contrast
to OpenSSL3, we include here 3DES into the legacy algorithms.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-01-12 18:30:04 +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
Arne Schwabe
d7b316bd11 Move helper function from OpenVPNClient int OpenVPNClientHelper
This also makes most of them non-static to avoid the problem that these
functions depend on Initprocess::Init being instantiated before being
called.

Rename the local variables eval to eval_cfg to avoid shadowing the
class field of the same name.
2021-12-15 13:03:41 +01:00
Arne Schwabe
d583aee26c Remove OpenVPNClient::app_expire() functionality
Early client seemed to have an inbuilt expire date. But that
functionality is no longer used and can be removed.
2021-12-15 13:03:19 +01:00
Arne Schwabe
3f90304154
Allow controlling usage of non preferred DC ciphers via option
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-11-12 20:58:46 +01:00
Arne Schwabe
847f8da3ee
Remove some leftover forceAesCbcCiphersuites code
This feature was removed a while ago and these settings do not do
anything any more.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-11-12 20:58:45 +01:00