[Openvpn-devel] [PATCH] msvc: switch to openssl3

2022-01-24 Thread Lev Stipakov
From: Lev Stipakov - add openssl3 port from https://github.com/microsoft/vcpkg/pull/20428/files with small changes: --- portfile.cmake.orig 2022-01-24 11:04:44.914467900 +0200 +++ portfile.cmake 2022-01-24 11:02:46.066088800 +0200 @@ -5,8 +5,8 @@ vcpkg_from_github( OUT_SOURCE_PATH

[Openvpn-devel] [PATCH 0/2] *** msvc: switch to openssl3 ***

2022-01-24 Thread Lev Stipakov
From: Lev Stipakov These two patches add openssl3 support for msvc build. The first one contains fixes to xkey code to make it compilable by msvc. Second one adds openssl3 port. Lev Stipakov (2): xkey: fix msvc build msvc: switch to openssl3 .github/workflows/build.yaml |

[Openvpn-devel] [PATCH 1/2] xkey: fix msvc build

2022-01-24 Thread Lev Stipakov
From: Lev Stipakov - use sizeof(void *) since msvc doesn't support sizeof of function ptr - use XKEY_PROV_PROPS macro instead of props since msvc requires constant expression in aggregate initializers Signed-off-by: Lev Stipakov --- src/openvpn/xkey_helper.c | 4 ++--

[Openvpn-devel] [PATCH 2/2] msvc: switch to openssl3

2022-01-24 Thread Lev Stipakov
From: Lev Stipakov Add openssl3 vcpkg port from https://github.com/microsoft/vcpkg/pull/20428/files with some changes: - switch to openssl 3.0.1 - add install_runtime make target to build openssl.exe - create tools/openssl and copy there openssl.exe with dependency dlls Signed-off-by: Lev

Re: [Openvpn-devel] [PATCH] msvc: switch to openssl3

2022-01-24 Thread Lev Stipakov
Hi, > A whole patch in the commit message is not very helpful and makes it hard to > read. Why not include this patch + the original, and apply the patch during > build? > > Or just add a pointer to the original file in the changed file so that it > could be diff-ed against if need be, Yeah,

Re: [Openvpn-devel] [PATCH] msvc: switch to openssl3

2022-01-24 Thread Selva Nair
Hi On Mon, Jan 24, 2022 at 4:47 AM Lev Stipakov wrote: > From: Lev Stipakov > > - add openssl3 port from > https://github.com/microsoft/vcpkg/pull/20428/files > with small changes: > > --- portfile.cmake.orig 2022-01-24 11:04:44.914467900 +0200 > +++ portfile.cmake 2022-01-24

[Openvpn-devel] [PATCH 3/3] Support PSS signing using pkcs11-helper >= 1.28

2022-01-24 Thread selva . nair
From: Selva Nair - Call pkcs11h_certificate_signAny_ex() when available so that the signature mechanism parameters can be pased. (Required for RSA-PSS signature). Signed-off-by: Selva Nair --- src/openvpn/pkcs11_openssl.c | 123 +-- 1 file changed, 118

[Openvpn-devel] [PATCH 2/3] Fix max saltlen calculation in cryptoapi.c

2022-01-24 Thread selva . nair
From: Selva Nair (nbits - 1)/8 should have been rounded up. Fix and move it to an inlined function for reuse in pkcs11_openssl.c (used in the next commit). Note: The error is not triggered in normal use as OpenSSL always seems to use saltlen="digest" for signing. Signed-off-by: Selva Nair ---

[Openvpn-devel] [PATCH 1/3] xkey: Use a custom error level for debug messages

2022-01-24 Thread selva . nair
From: Selva Nair D_XKEY = loglev(6, 69, M_DEBUG) is defined and used for all low level debug messages from xkey_provider.c and xkey_helper.c As suggested by Arne Schwabe Signed-off-by: Selva Nair --- src/openvpn/errlevel.h | 1 + src/openvpn/xkey_helper.c | 8 +--

Re: [Openvpn-devel] [PATCH 1/2] xkey: fix msvc build

2022-01-24 Thread Selva Nair
On Mon, Jan 24, 2022 at 2:22 PM Lev Stipakov wrote: > From: Lev Stipakov > > - use sizeof(void *) since msvc doesn't support sizeof of function ptr > This is not just an msvc problem, but signals a bigger issue it seems. In retrospect, passing function pointers pickled this was probably a

Re: [Openvpn-devel] [PATCH] msvc: switch to openssl3

2022-01-24 Thread Selva Nair
Hi On Mon, Jan 24, 2022 at 1:56 PM Lev Stipakov wrote: > Hi, > > > A whole patch in the commit message is not very helpful and makes it > hard to read. Why not include this patch + the original, and apply the > patch during build? > > > > Or just add a pointer to the original file in the