From: Olivier Houchard Date: Wed, 25 Nov 2026 17:04:35 +0000 (+0100) Subject: BUG/MEDIUM: ssl/cli: keep the crt-store conf on "add ssl crt-list" X-Git-Tag: v3.5-dev14~15 X-Git-Url: https://git.kaiwu.me/http/ngx_http_ssi_module.html?a=commitdiff_plain;h=ea809b9fae0c0e752d3515860375fa62bdf12291;p=haproxy.git BUG/MEDIUM: ssl/cli: keep the crt-store conf on "add ssl crt-list" In cli_parse_add_crtlist(), a store without any instance takes the conf parsed from the line, even when it was declared in a crt-store section. So adding such a certificate to a crt-list over the CLI silently drops the settings of its "load" line: the file names are no longer reported by "show ssl cert", and above all "ocsp-update on" is lost, so no OCSP update is scheduled for it. A line with other keywords also replaces the ones of the crt-store, while this is refused in a crt-list file. Let's only replace the conf when the store doesn't come from a crt-store, and compare the confs otherwise, as is done at boot. This relies on the previous patch to work on an updated certificate. This was introduced by commit 1bc6e990f ("MEDIUM: ssl/cli: handle crt-store keywords in crt-list over the CLI") in 3.0-dev12, so this should be backported to 3.0. --- diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index a3fb79618..758d2300d 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -1419,10 +1419,10 @@ static int cli_parse_add_crtlist(char **args, char *payload, struct appctx *appc } /* We can use a crt-store keyword when: - * - no ckch_inst are linked OR + * - no ckch_inst are linked and the store is not from a crt-store OR * - ckch_inst are linked but exact same ckch_conf is used. */ - if (LIST_ISEMPTY(&store->ckch_inst)) { + if (LIST_ISEMPTY(&store->ckch_inst) && store->conf.used != CKCH_CONF_SET_CRTSTORE) { old_cc = store->conf; store->conf = cc;