[Openvpn-devel] [PATCH 3/3] Add unit test for cipher name translations

2020-06-05 Thread Arne Schwabe
The unit test duplicates some part of the test for the ncp-cipher list but that is not a bad thing. Signed-off-by: Arne Schwabe --- tests/unit_tests/openvpn/test_crypto.c | 68 ++ 1 file changed, 68 insertions(+) diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tes

[Openvpn-devel] [PATCH 2/3] Make cipher_kt_get also accept OpenVPN config cipher name

2020-06-05 Thread Arne Schwabe
Basically calls to cipher_kt_get were calling translate_cipher_name_from_openvpn. The only two exception were the (broken) unit test and tls-crypt that uses cipher_kt_get("AES-256-CTR") Signed-off-by: Arne Schwabe --- src/openvpn/crypto.c | 2 +- src/openvpn/crypto_backend.h | 3 ++- src

[Openvpn-devel] [PATCH 1/3] Make cipher_kt_name always return normalised cipher name

2020-06-05 Thread Arne Schwabe
The mbed TLS variant of the call already returned the normalised name while the OpenSSL variant did not. On top of that, all calls but one to cipher_kt_name were translate_cipher_name_to_openvpn. This commit moves the call of translate_cipher_name_to_openvpn into cipher_kt_name or avoids calling it

Re: [Openvpn-devel] [PATCH v6 3/3] Add unit tests for engine keys

2020-06-05 Thread Arne Schwabe
Am 29.05.20 um 00:59 schrieb James Bottomley: > Testing engines is problematic, so one of the prerequisites built for > the tests is a simple openssl engine that reads a non-standard PEM > guarded key. The test is simply can we run a client/server > configuration with the usual sample key replaced

Re: [Openvpn-devel] [PATCH v6 1/3] openssl: add engine method for loading the key

2020-06-05 Thread Arne Schwabe
Am 29.05.20 um 00:59 schrieb James Bottomley: > As well as doing crypto acceleration, engines can also be used to load > key files. If the engine is set, and the private key loading fails > for bio methods, this patch makes openvpn try to get the engine to > load the key. If that succeeds, we end

Re: [Openvpn-devel] [PATCH v6 2/3] crypto_openssl: add initialization to pick up local configuration

2020-06-05 Thread Arne Schwabe
Am 29.05.20 um 00:59 schrieb James Bottomley: > The test programme for the new openssl engine code requires overriding ^^^ Unrelated to this commit but I wondered about this spelling and it seems that the British programme spelling usually is a TV programme while program is used

Re: [Openvpn-devel] [PATCH v6 3/3] Add unit tests for engine keys

2020-06-05 Thread James Bottomley
On Fri, 2020-06-05 at 13:31 +0200, Arne Schwabe wrote: [...] > Somehow this turns into a autoconf/automake nightmare: Heh, got to say autoconf is a bit of a nightmare for its more esoteric features because the docs usually don't cover them and you end up having to take the opinion of the internet,

Re: [Openvpn-devel] [PATCH v6 3/3] Add unit tests for engine keys

2020-06-05 Thread James Bottomley
On Fri, 2020-06-05 at 09:28 -0700, James Bottomley wrote: > On Fri, 2020-06-05 at 13:31 +0200, Arne Schwabe wrote: > [...] > > Somehow this turns into a autoconf/automake nightmare: > > Heh, got to say autoconf is a bit of a nightmare for its more > esoteric features because the docs usually don't

Re: [Openvpn-devel] [PATCH v6 3/3] Add unit tests for engine keys

2020-06-05 Thread Arne Schwabe
Am 05.06.20 um 19:19 schrieb James Bottomley: > On Fri, 2020-06-05 at 09:28 -0700, James Bottomley wrote: >> On Fri, 2020-06-05 at 13:31 +0200, Arne Schwabe wrote: >> [...] >>> Somehow this turns into a autoconf/automake nightmare: >> >> Heh, got to say autoconf is a bit of a nightmare for its more