]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: ssl/ckch: copy the origin of the conf in ckchs_dup()
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Nov 2026 17:04:34 +0000 (18:04 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 25 Nov 2026 16:51:43 +0000 (17:51 +0100)
ckchs_dup() copies the content of the ckch_conf, but not its "used"
field, which tells if the conf comes from a crt-store, from a crt-list,
or is empty. So once a certificate was updated, with "set ssl cert" and
"commit ssl cert" for example, its store looks like it was loaded
without any keyword, and ckch_conf_cmp() applies the wrong rules: adding
a crt-store certificate to a crt-list over the CLI with the very
keywords of its crt-store is refused.

Let's copy that field too. The conf is copied since commit 5b85b81d8
("MINOR: ssl/ckch: handle ckch_conf in ckchs_dup() and
ckch_conf_clean()") in 3.2-dev11, so this should be backported to 3.2.

src/ssl_ckch.c

index 84b3d6fcbbc36a0d211fd94daf0f527653d8bbb7..ca90eeb7bfac3e516baef671f0dea50fae35e79d 100644 (file)
@@ -1083,6 +1083,7 @@ struct ckch_store *ckchs_dup(const struct ckch_store *src)
                goto error;
 
 
+       dst->conf.used = src->conf.used;
        dst->conf.ocsp_update_mode = src->conf.ocsp_update_mode;
        dst->conf.jwt = src->conf.jwt;