BUG/MEDIUM: ssl: crt-list negative filters don't work
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Aug 2020 12:31:19 +0000 (14:31 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 30 Sep 2020 06:39:35 +0000 (08:39 +0200)
commit44b494a33c7bca86a3262ea916c70326b5034c01
tree82a7e0e68f645678031fa5d8d57542d9e7027823
parentcd89e562ba64327e0262d46d1781c3547a25ce56
BUG/MEDIUM: ssl: crt-list negative filters don't work

The negative filters which are supposed to exclude a SNI from a
wildcard, never worked. Indeed the negative filters were skipped in the
code.

To fix the issue, this patch looks for negative filters that are on the
same line as a the wildcard that just matched.

This patch should fix issue #818. It must be backported in 2.2.  The
problem also exists in versions > 1.8 but the infrastructure required to
fix this was only introduced in 2.1.  In older versions we should
probably change the documentation to state that negative filters are
useless.

(cherry picked from commit 30f9e095f5ed695348f3041ef183f25739c2ace1)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/ssl_sock.c