From: Remi Tricot-Le Breton Date: Thu, 26 Nov 2026 10:11:53 +0000 (+0100) Subject: BUG/MINOR: jwt: Create jwt tree entry even for new empty certificates X-Git-Url: https://git.kaiwu.me/http/ngx_http_ssi_module.html?a=commitdiff_plain;h=7dcc9681fe930fce66c09b8cf695b9d54546f533;p=haproxy.git BUG/MINOR: jwt: Create jwt tree entry even for new empty certificates A new empty certificate created by calling "new ssl cert" directly followed by "commit ssl cert" would not have a corresponding JWT tree entry created since only the data-loading code paths were covered in the previous jwt tree related commits. With this patch we always have a corresponding jwt tree entry for every ckch_store. This patch can be backported to 3.4. --- diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index ca90eeb7b..1389c7a72 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -3489,6 +3489,14 @@ int ckch_store_create(char *path, char **err) goto error; } + /* Create empty entry into JWT-specific tree */ + if (jwt_tree_create_entry_from_store(store, err)) { + memprintf(err,"%scould not create jwt tree entry for '%s'.", err && *err ? *err : "", store->path); + ckch_store_free(store); + store = NULL; + goto error; + } + /* insert into the ckchs tree */ ebst_insert(&ckchs_tree, &store->node); memprintf(err, "New empty certificate store '%s'!\n", path);