]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Allow the TLS session to send out TLS alerts
authorArne Schwabe <arne@rfc2549.org>
Mon, 8 Apr 2024 12:49:33 +0000 (14:49 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 1 Jun 2024 13:07:05 +0000 (15:07 +0200)
commitfbe3b49b373ea8e81aaa31a383258403a3bfcd07
tree5f457d97f29a0b4676296cae8672f8656bc301c2
parent55bb3260c12bae33b6a8eac73cbb6972f8517411
Allow the TLS session to send out TLS alerts

Previous OpenVPN versions shut down the TLS control channel immediately
when encountering an error. This also meant that we would not send out
TLS alerts to notify a client about potential problems like mismatching
TLS versions or having no common cipher.

This commit adds a new key_state S_ERROR_PRE which still allows to
send out the remaining TLS packets of the control session which are
typically the alert message and then going to S_ERROR. We do not
wait for retries. So this is more a one-shot notify but that is
acceptable in this situation.

Sending out alerts is a slight compromise in security as alerts give
out a bit of information that otherwise is not given
out. But since all other consumers TLS implementations are already doing this
and TLS implementations (nowadays) are very careful not to leak (sensitive)
information by alerts and since the user experience is much better with
alerts, this compromise is worth it.

Change-Id: I0ad48915004ddee587e97c8ed190ba8ee989e48d
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20240408124933.243991-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28540.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Changes.rst
src/openvpn/ssl.c
src/openvpn/ssl_backend.h
src/openvpn/ssl_common.h
src/openvpn/ssl_mbedtls.c
src/openvpn/ssl_openssl.c