This avoids special casing the cipher none/auth none case in other parts, e.g. in the upcoming buffer/frame rework.
Signed-off-by: Arne Schwabe <a...@rfc2549.org> --- src/openvpn/init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 6c82c0dca..2c18313d6 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3068,9 +3068,15 @@ do_init_finalize_tls_frame(struct context *c) * No encryption or authentication. */ static void -do_init_crypto_none(const struct context *c) +do_init_crypto_none(struct context *c) { ASSERT(!c->options.test_crypto); + + /* Initialise key_type with auth/cipher "none", so the key_type struct is + * valid */ + init_key_type(&c->c1.ks.key_type, "none", "none", + c->options.test_crypto, true); + msg(M_WARN, "******* WARNING *******: All encryption and authentication features " "disabled -- All data will be tunnelled as clear text and will not be " -- 2.33.0 _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel