]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: remove CO_FL_SSL_WAIT_HS from CO_FL_HANDSHAKE
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 14:23:13 +0000 (15:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 15:34:26 +0000 (16:34 +0100)
commit4450b587dd3065d22678d537d1082ec2567e98a8
treed1997c1d1d4f5c8881ecde791cc49f8c4806a4b5
parent18955db43dd242c96f81f248b11ae56e01a21e89
MINOR: connection: remove CO_FL_SSL_WAIT_HS from CO_FL_HANDSHAKE

Most places continue to check CO_FL_HANDSHAKE while in fact they should
check CO_FL_HANDSHAKE_NOSSL, which contains all handshakes but the one
dedicated to SSL renegotiation. In fact the SSL layer should be the
only one checking CO_FL_SSL_WAIT_HS, so as to avoid processing data
when a renegotiation is in progress, but other ones randomly include it
without knowing. And ideally it should even be an internal flag that's
not exposed in the connection.

This patch takes CO_FL_SSL_WAIT_HS out of CO_FL_HANDSHAKE, uses this flag
consistently all over the code, and gets rid of CO_FL_HANDSHAKE_NOSSL.

In order to limit the confusion that has accumulated over time, the
CO_FL_SSL_WAIT_HS flag which indicates an ongoing SSL handshake,
possibly used by a renegotiation was moved after the other ones.
include/types/connection.h
src/backend.c
src/ssl_sock.c
src/tcp_rules.c
src/xprt_handshake.c