[Openvpn-devel] [PATCH v2 2/3] Build unit tests in mingw Windows build

2023-02-03 Thread selva . nair
From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests but not run any. Copy to Windows and run manually. Ex

[Openvpn-devel] [PATCH v2 3/3] Add a unit test for functions in cryptoapi.c

2023-02-03 Thread selva . nair
From: Selva Nair - Though named cryptoapi_testdriver, right now this only tests parsing of thumbprint specified as a selector for --cryptioapicert option. More tests coming.. v2: a line that belongs here was mistakenly included in the previous commit. Corrected. Signed-off-by: Selva Nair -

[Openvpn-devel] [PATCH 3/3] Add a unit test for functions in cryptoapi.c

2023-02-03 Thread selva . nair
From: Selva Nair - Though named cryptoapi_testdriver, right now this only tests parsing of thumbprint specified as a selector for --cryptioapicert option. More cryptoapi tests coming.. Signed-off-by: Selva Nair --- As requested during review of the 4/4 patch of cryptoapi series. Note that

[Openvpn-devel] [PATCH 2/3] Build unit tests in mingw Windows build

2023-02-03 Thread selva . nair
From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests but not run any. Copy to Windows and run manually. Ex

[Openvpn-devel] [PATCH 1/3] Conditionally add subdir-objects option to automake

2023-02-03 Thread selva . nair
From: Selva Nair - Eliminates repeated warnings such as warning: source file '$(openvpn_srcdir)/env_set.c' is in a subdirectory, but option 'subdir-objects' is disabled - Enabled only for automake >= 1.16 as older versions have a buggy implementation of this option Main side effect of thi

[Openvpn-devel] [PATCH v2 4/4] cryptoapi.c: simplify parsing of thumbprint hex string

2023-02-03 Thread selva . nair
From: Selva Nair v2: Moved the "parse_hexstring" chunk to a function for clarity and to permit unit-testing. A test is submitted as a follow up patch. Signed-off-by: Selva Nair --- src/openvpn/cryptoapi.c | 77 - 1 file changed, 37 insertions(+), 40 del

[Openvpn-devel] [PATCH 1/5] Windows: fix unused function setenv_foreign_option

2023-02-03 Thread Frank Lichtenheld
Signed-off-by: Frank Lichtenheld --- src/openvpn/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6ae3faf8..ab1b01cf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1041,6 +1041,7 @@ setenv_settings(struct env_s

[Openvpn-devel] [PATCH 0/5] Allow mingw builds with -Werror

2023-02-03 Thread Frank Lichtenheld
Since I needed to test mingw builds today, I took a look into the warnings reported. Most of those patches are trivial and straightforward. Not 100% sure whether the recv/send one is a good idea. Frank Lichtenheld (5): Windows: fix unused function setenv_foreign_option Windows: fix unused var

[Openvpn-devel] [PATCH 5/5] Windows: fix signedness errors with recv/send

2023-02-03 Thread Frank Lichtenheld
On Linux those functions actually take void pointer, so no behavior change there. On Windows, we avoid warnings about unsigned char vs char. Signed-off-by: Frank Lichtenheld --- src/openvpn/manage.c | 4 ++-- src/openvpn/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --g

[Openvpn-devel] [PATCH 3/5] Windows: fix wrong printf format in x_check_status

2023-02-03 Thread Frank Lichtenheld
Signed-off-by: Frank Lichtenheld --- src/openvpn/error.c | 4 ++-- src/openvpn/syshead.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.c b/src/openvpn/error.c index 89a08cec..a2c9aa4c 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -695,1

[Openvpn-devel] [PATCH 4/5] Windows: fix unused variable in win32_get_arch

2023-02-03 Thread Frank Lichtenheld
Signed-off-by: Frank Lichtenheld --- src/openvpn/win32.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 44176936..ad3d9bf6 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -1358,7 +1358,6 @@ win32_get_arch(ar

[Openvpn-devel] [PATCH 2/5] Windows: fix unused variables in delete_route_ipv6

2023-02-03 Thread Frank Lichtenheld
At this point it might be easier to create a dedicated function for Windows... Signed-off-by: Frank Lichtenheld --- src/openvpn/route.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 82519c94.

[Openvpn-devel] [PATCH] configure: enable DCO by default on FreeBSD/Linux

2023-02-03 Thread Frank Lichtenheld
It is time. Automatically disabled when - iproute2 is enabled - libnl-genl is missing on Linux - libnv is missing on FreeBSD Signed-off-by: Frank Lichtenheld --- configure.ac | 79 +--- 1 file changed, 62 insertions(+), 17 deletions(-) diff --git

Re: [Openvpn-devel] [PATCH 4/4] cryptoapi.c: simplify parsing of thumbprint hex string

2023-02-03 Thread Selva Nair
On Fri, Feb 3, 2023 at 5:25 AM Arne Schwabe wrote: > > > Well, replying to myself: > > > > I tried building the unit tests using cmocka for Windows > > (cross-compiling using mingw-w64 with locally built cmocka). > > Unfortunately, none of the tests could be built out of the box because > > of mi

Re: [Openvpn-devel] [PATCH v7] Dynamic tls-crypt for secure soft_reset/session renegotiation

2023-02-03 Thread Heiko Hund
On Dienstag, 31. Januar 2023 14:52:48 CET Arne Schwabe wrote: > Patch v7: also xor tls-auth key data into the dynamic tls-crypt key like > tls-crypt key data I've tested this with the openvpn3 implementation thoroughly in combination with --tls-auth, --tls-crypt and without any wrapping

Re: [Openvpn-devel] [PATCH 4/4] cryptoapi.c: simplify parsing of thumbprint hex string

2023-02-03 Thread Arne Schwabe
Well, replying to myself: I tried building the unit tests using cmocka for Windows (cross-compiling using mingw-w64 with locally built cmocka). Unfortunately, none of the tests could be built out of the box because of missing dependencies, so I guess no one is running these tests on Window