BUG/MINOR: ssl/cli: sni_ctx' mustn't always be used as filters
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 9 Mar 2020 15:56:39 +0000 (16:56 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 9 Mar 2020 16:32:04 +0000 (17:32 +0100)
commit6763016866721a5c27b6a481783490e3c1692f8b
tree5acb3ed61038e238d705f59eb6dda42025df6e64
parent0a52846603507411b6e6391448876dfc26c02499
BUG/MINOR: ssl/cli: sni_ctx' mustn't always be used as filters

Since commit 244b070 ("MINOR: ssl/cli: support crt-list filters"),
HAProxy generates a list of filters based on the sni_ctx in memory.
However it's not always relevant, sometimes no filters were configured
and the CN/SAN in the new certificate are not the same.

This patch fixes the issue by using a flag filters in the ckch_inst, so
we are able to know if there were filters or not. In the late case it
uses the CN/SAN of the new certificate to generate the sni_ctx.

note: filters are still only used in the crt-list atm.
include/types/ssl_sock.h
src/ssl_sock.c