]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl: Always check the ALPN after handshake
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 9 Dec 2025 15:02:00 +0000 (16:02 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 9 Dec 2025 15:43:31 +0000 (16:43 +0100)
commit260d64d7870ed3c4be62f98a4253e25fa3db6a6d
tree62a88837b69b1b9ca318b2287ce7a43e2c9f50b5
parent594408cd612b5d80b7120d8a4f157f928ed38710
BUG/MEDIUM: ssl: Always check the ALPN after handshake

Move the code that is responsible for checking the ALPN, and updating
the one stored in the server's path_param, from after we created the
mux, to after we did an handshake. Once we did it once, the mux will not
be created by the ssl code anymore, as when we know which mux to use
thanks to the ALPN, it will be done earlier in connect_server(), so in
the unlikely event it changes, we would not detect it anymore, and we'd
keep on creating the wrong mux.
This can be reproduced by doing a first request, and then changing the
ALPN of the server without haproxy noticing (ie without haproxy noticing
that the server went down).

This should be backported to 3.3.
src/ssl_sock.c