]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl/cli: crash when crt inserted into a crt-list
authorWilliam Lallemand <wlallemand@haproxy.org>
Mon, 20 Jun 2022 14:51:53 +0000 (16:51 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 20 Jun 2022 15:27:49 +0000 (17:27 +0200)
commitcb6c5f468341e1902fae7527bfe76921d9d2aea6
tree06924821222920888a7ca024430ac37262137b37
parentdebaa04f9e249f6bf75d40f38b34cfdcd7fc2047
BUG/MEDIUM: ssl/cli: crash when crt inserted into a crt-list

The crash occures when the same certificate which is used on both a
server line and a bind line is inserted in a crt-list over the CLI.

This is quite uncommon as using the same file for a client and a server
certificate does not make sense in a lot of environments.

This patch fixes the issue by skipping the insertion of the SNI when no
bind_conf is available in the ckch_inst.

Change the reg-test to reproduce this corner case.

Should fix issue #1748.

Must be backported as far as 2.2. (it was previously in ssl_sock.c)
reg-tests/ssl/add_ssl_crt-list.vtc
src/ssl_crtlist.c