]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: ssl/cli: don't clear the jwt flag on "add ssl crt-list"
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Nov 2026 17:04:36 +0000 (18:04 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 25 Nov 2026 16:51:43 +0000 (17:51 +0100)
When a store without any instance takes the conf parsed from an "add ssl
crt-list" line, its "jwt" flag is overwritten too, while the certificate
is still in the JWT tree. After "add ssl jwt" followed by "add ssl
crt-list", the certificate is no longer listed by "show ssl jwt", it can
be deleted while in use for JWT validation, and the JWT tree is no
longer updated when the certificate is.

Let's keep the flag when it was set. This was introduced by commit
18ff130e9 ("MINOR: jwt: Add new "jwt" certificate option") in 3.3-dev10,
so this should be backported to 3.3.

src/ssl_crtlist.c

index 758d2300dd01cb18f8dd57188db3341f8fc9072b..a0399cb3eb542ea758f03a1aa6280f6ff5faf6d4 100644 (file)
@@ -1426,6 +1426,8 @@ static int cli_parse_add_crtlist(char **args, char *payload, struct appctx *appc
 
                old_cc = store->conf;
                store->conf = cc;
+               /* still in the JWT tree */
+               store->conf.jwt |= old_cc.jwt;
                adopted = 1;
                /* fresh new, run more init (for example init ocsp-update tasks) */
                cfgerr |= ckch_store_load_files(&cc, store, 1, "CLI", 1, &err);