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

2023-02-14 Thread Gert Doering
Hi, On Sat, Feb 11, 2023 at 01:44:04PM -0500, Selva Nair wrote: > On Sat, Feb 11, 2023 at 1:32 PM Gert Doering wrote: > > > /bin/bash ../../../libtool --tag=CC --mode=link i686-w64-mingw32-gcc > > This is a 32 bit build which I never tried. Maybe cmocka is not built for > 32 bit? Yes, that

[Openvpn-devel] [PATCH v2 4/4] Reduce initialisation spam from verb <= 3 and print summary instead

2023-02-14 Thread Arne Schwabe
The messages about cipher initialisation are currently very noisy, especially if tls-auth/tls-crypt is in use. Typically messages like this is display for AES-256-CBC with SHA256: Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key Outgoing Data Channel: Using 256 bit

Re: [Openvpn-devel] [PATCH] Improve format specifier for socket handle in Windows

2023-02-14 Thread Arne Schwabe
Am 10.02.23 um 23:07 schrieb Antonio Quartulli: Hi, On 10/02/2023 20:54, Selva Nair wrote:     I also discussed this with Lev and, despite this being different from     what we do in the *nix world (where decimal representations make sense     for file descriptors), it seems to be the right

[Openvpn-devel] [PATCH applied] Re: Combine extra_tun/frame parameter of frame_calculate_payload_overhead

2023-02-14 Thread Gert Doering
Indeed, makes sense :-) Stared-at-code, smoke tested on GH actions to be sure. Your patch has been applied to the master and release/2.6 branch. commit e759c0ea6fe8679edf4d5208f2f0dc8cee5e948c (master) commit e1fac38c29e0d26eb3bd13812529721d9ba0591e (release/2.6) Author: Arne Schwabe Date:

[Openvpn-devel] [PATCH applied] Re: Update the last sections in the man page to a be a bit less outdated

2023-02-14 Thread Gert Doering
Nothing to test here :-) - "gives" fix applied as requested. Your patch has been applied to the master and release/2.6 branch. commit 48d27e29e68c6049872abbee38b1375522de249f (master) commit 8cbe09dc98824d992fde0ce1d4f218dd46e0bf2f (release/2.6) Author: Arne Schwabe Date: Fri Feb 10 15:27:09

[Openvpn-devel] [PATCH applied] Re: Improve format specifier for socket handle in Windows

2023-02-14 Thread Gert Doering
I'm so not testing this... but I do not need to, the change is trivial (ok, I cheated, I did test-compile on MinGW). Your patch has been applied to the master branch. commit 6731314a82d1a3c76b5497749985ee20c0c7d8eb (master) commit 8e3331a901dbececc8622e97ed0592ddadf56996 (release/2.6) Author:

[Openvpn-devel] [PATCH applied] Re: Add building unit tests with mingw to github actions

2023-02-14 Thread Gert Doering
Tested by pushing to my GH repo, and staring in amazement at the output. Your patch has been applied to the master and release/2.6 branch. commit 9719393b7cf94d37f3706ca32c02433e8578599b (master) commit adf00ebd51952554b02c6d8a5312b9b035b1f64c (HEAD -> release/2.6) Author: Arne Schwabe Date:

[Openvpn-devel] [PATCH] Use proper print format/casting when converting msg_channel handle

2023-02-14 Thread Arne Schwabe
The current casting triggers a warning on 32bit: init.c:1842:66: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] Use the proper printf format specifier for printing a pointer avoiding the cast alltogether. In options.c use a cast to intptr_t before

[Openvpn-devel] [PATCH applied] Re: Revise the cipher negotiation about OpenVPN3 in the man page

2023-02-14 Thread Gert Doering
Acked-by: Gert Doering "Seems to make sense". Language fixes from Frank included. Your patch has been applied to the master and release/2.6 branch. commit 4da513d584b4e7521de5a47a95cc27fa8a342fd3 (master) commit cfbfb801e6432382edbbec758335d7c142707206 (release/2.6) Author: Arne Schwabe Date:

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

2023-02-14 Thread Gert Doering
Hi, On Sat, Feb 04, 2023 at 01:40:10AM -0500, selva.n...@gmail.com wrote: > 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

[Openvpn-devel] [PATCH] Add missing check for nl_socket_alloc failure

2023-02-14 Thread Arne Schwabe
This can happen if the memory alloc fails. Signed-off-by: Arne Schwabe --- src/openvpn/dco_linux.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index c84f9cfe1..b1103c8d5 100644 --- a/src/openvpn/dco_linux.c +++

[Openvpn-devel] [PATCH applied] Re: cyryptapi.c: log the selected certificate's name

2023-02-14 Thread Gert Doering
Acked-by: Gert Doering I think this is a useful addition. Code looks good according to the documentation for CertGetNameStringW() and WideCharToMultiByte(). Tested on a MinGW compile (yes, compiles :-) ). Not actually tested on a life windows system, as my "have p12 certs imported, reference

Re: [Openvpn-devel] [PATCH] Add missing check for nl_socket_alloc failure

2023-02-14 Thread Gert Doering
Hi, On Tue, Feb 14, 2023 at 02:56:58PM +0100, Arne Schwabe wrote: > resolve_ovpn_netlink_id(int msglevel) > { > -int ret; > struct nl_sock *nl_sock = nl_socket_alloc(); > > -ret = genl_connect(nl_sock); > +if (!nl_sock) > +{ > +msg(msglevel, "Allocating net link

Re: [Openvpn-devel] [PATCH applied] Re: cyryptapi.c: log the selected certificate's name

2023-02-14 Thread Gert Doering
Hi, ... and apologies for not fixing the Subject: - I saw the typo, it was on my "must fix" list, and then I read too much Microsoft documentation and was distracted... gert -- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer,

Re: [Openvpn-devel] [PATCH applied] Re: cyryptapi.c: log the selected certificate's name

2023-02-14 Thread Gert Doering
Hi, On Tue, Feb 14, 2023 at 03:00:33PM +0100, Gert Doering wrote: > The 3 new gc_free() are a bit ugly, but unavoidable without either > having "gc_free() in the middle of the function" (which we don't do) or > restructure more & add "ret = 1 ; goto end" code... so it is what it is. I did have

[Openvpn-devel] [PATCH applied] Re: cryptoapi.c: remove pre OpenSSL-3.01 support

2023-02-14 Thread Gert Doering
Acked-by: Gert Doering This patch looks large and complex, but all it does do is "rip out code parts that are inside #ifndef HAVE_XKEY_PROVIDER" (plus add a message as replacement). This is a welcome change, and in line with what we discussed some time ago regarding OpenSSL support for windows

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

2023-02-14 Thread Gert Doering
Acked-by: Gert Doering Patch looks reasonable, and compiles fine :-) - looking forward to merge the unit test patch for it. There is a similar code piece in options.c::parse_hash_fingerprint(), but it has slightly different semantics wrt length and separators, so merging these (my initial

[Openvpn-devel] [PATCH applied] Re: Option --cryptoapicert: support issuer name as a selector

2023-02-14 Thread Gert Doering
Acked-by: Gert Doering I did hope that someone else would report back and say "I have tested this and it works great!". Nobody volunteered and I wanted this out of the way (and I think it's a useful addition with very little code needed). Code looks good according to documentation of

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

2023-02-14 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. v3: add to list of tests run

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

2023-02-14 Thread Gert Doering
Hi, On Tue, Feb 07, 2023 at 02:20:26PM +0100, Frank Lichtenheld wrote: > Automatically disabled when > - iproute2 is enabled > (Don't want to force people specifying --disable-dco explicitely) > - libnv is missing on FreeBSD > (FreeBSD version too old anyway) > > Will still error out if

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

2023-02-14 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. v3: add to list of tests run