BUG/MEDIUM: ssl/crt-list: bad behavior with "commit ssl cert"
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 15 Dec 2020 13:57:46 +0000 (14:57 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Jan 2021 12:37:46 +0000 (13:37 +0100)
commit9f714695d07aac3c20cf1470b4b6df9b1f6dabb8
tree22b717442bedce2e09e71d5abd58b27d6fca60a5
parent0881842bf7a8de3e3cf93bece19f160945ba984a
BUG/MEDIUM: ssl/crt-list: bad behavior with "commit ssl cert"

In issue #1004, it was reported that it is not possible to remove
correctly a certificate after updating it when it came from a crt-list.

Indeed the "commit ssl cert" command on the CLI does not update the list
of ckch_inst in the crtlist_entry. Because of this, the "del ssl
crt-list" command does not remove neither the instances nor the SNIs
because they were never linked to the crtlist_entry.

This patch fixes the issue by inserting the ckch_inst in the
crtlist_entry once generated.

Must be backported as far as 2.2.

(cherry picked from commit a55685bfea0c95fd311b9bd0478950e534305786)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/ssl_ckch.c