]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: ssl: Don't allow to set NULL sni
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 Dec 2025 08:41:03 +0000 (09:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Dec 2025 14:22:00 +0000 (15:22 +0100)
commit3534efe79879daeffe52fbb5eca8955df324a981
tree1149602f8af67c680f375cff76b2619f569e6f1f
parent7872260525fa696b12e43e948738c59fd7047a4d
BUG/MINOR: ssl: Don't allow to set NULL sni

ssl_sock_set_servername() function was documented to support NULL sni to
unset it. However, the man page of SSL_get_servername() does not mentionned
it is supported or not. And it is in fact not supported by WolfSSL and leads
to a crash if we do so.

For now, this function is never called with a NULL sni, so it better and
safer to forbid this case. Now, if the sni is NULL, the function does
nothing.

This patch could be backported to all stable versions.
src/ssl_sock.c