BUG/MEDIUM: ssl/crt-list: correctly insert crt-list line if crt already loaded
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 6 Nov 2020 15:24:07 +0000 (16:24 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 6 Nov 2020 15:52:54 +0000 (16:52 +0100)
commit689d981541a4805760acd6a2ba1433dc3d3534b1
tree8fcba861f9ca057600c83f4dea6a8df2e61a12c4
parent7a50763d122312d2245fce4fd1cca4adfd5314fe
BUG/MEDIUM: ssl/crt-list: correctly insert crt-list line if crt already loaded

In issue #940, it was reported that the crt-list does not work correctly
anymore. Indeed when inserting a crt-list line which use a certificate
previously seen in the crt-list, this one won't be inserted in the SNI
list and will be silently ignored.

This bug was introduced by commit  47da821 "MEDIUM: ssl: emulates the
multi-cert bundles in the crtlist".

This patch also includes a reg-test which tests this issue.

This bugfix must be backported in 2.3.

(cherry picked from commit 50c03aac0417f7d70f98f31e513441c0fb743110)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
reg-tests/ssl/simple.crt-list [new file with mode: 0644]
reg-tests/ssl/ssl_simple_crt-list.vtc [new file with mode: 0644]
src/ssl_crtlist.c