]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: jwt: Use JWT cert tree for jwt_decrypt
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 18 Nov 2026 14:09:31 +0000 (15:09 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 Nov 2026 09:02:42 +0000 (09:02 +0000)
commitb9e3330eb954518a3af035b399614ce376fa36bb
tree6bf78fa984a3cb67be913af9cc36005e832f624e
parent607222c3569ba136d34ff44f3df2f67971db2f7e
BUG/MEDIUM: jwt: Use JWT cert tree for jwt_decrypt

The jwt_decrypt converters have the same issue as the jwt_verify one,
they were taking the ckch_lock during runtime processing which could
fail in case the lock was already taken by a CLI operation.
We now make use of the already existing jwt tree to store the private
keys used in the decrypt operations. The only lock taken during runtime
is the jwt tree one which also gets locked in write mode while updating
certificates via the CLI or changing the jwt mode ("add/del ssl jwt").

This patch is a continuation of "BUG/MEDIUM: jwt: Use only JWT cert tree
for jwt_verify", it helps fix for good the issue decribed in GitHub
issue #3526. It relies on "MINOR: jwt: Add rwlock to jwt_cert_tree" as
well.

This patch should be backported up to 3.4.
include/haproxy/jwt-t.h
include/haproxy/jwt.h
src/jwe.c
src/jwt.c