]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tls-crypt-v2: fix client reconnect bug
authorSteffan Karger <steffan.karger@fox-it.com>
Wed, 31 Oct 2018 13:07:16 +0000 (14:07 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 18 Nov 2018 18:50:59 +0000 (19:50 +0100)
commit19d6d9c3533b83f934ea93359bca086a5d06011a
treea60c9af9b900fa8ca55cbb6e77fc9d402b75457f
parent01039891ece9f38f7a17c80e5afc261ab5bcbaf3
tls-crypt-v2: fix client reconnect bug

As reported by tincantech on the openvpn-devel IRC channel, a tls-crypt-v2
client could be caused to trigger an assert in tls_crypt_wrap() because the
client key might not be correctly initialized after a reconnect attempt.

This was caused by code that was written before the connection-block
tls-auth/tls-crypt logic was integrated (57d6f103), rebased on that change,
but not sufficiently changed to be compatible with the new logic.

This commit fixes that bug.

Note that I also moved the violating hunk of code to the same function
where the tls-auth and tls-crypt (v1) keys are initialized. Once moved
there, it is immediately clear that v2 didn't follow the same (new) logic.

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Tested-by: Richard Bonhomme <tincanteksup@gmail.com>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <1540991236-4016-1-git-send-email-steffan.karger@fox-it.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17866.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c