mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: ssl: Prevent delete on certificate used by jwt_verify
A ckch_store used in JWT verification might not have any ckch instances or crt-list entries linked but we don't want to be able to remove it via the CLI anyway since it would make all future jwt_verify calls using this certificate fail.
This commit is contained in:
parent
31955e6e0a
commit
093a3ad7f2
@ -3192,6 +3192,9 @@ static int cli_parse_del_cert(char **args, char *payload, struct appctx *appctx,
|
|||||||
if (!LIST_ISEMPTY(&store->ckch_inst)) {
|
if (!LIST_ISEMPTY(&store->ckch_inst)) {
|
||||||
memprintf(&err, "certificate '%s' in use, can't be deleted!\n", filename);
|
memprintf(&err, "certificate '%s' in use, can't be deleted!\n", filename);
|
||||||
goto error;
|
goto error;
|
||||||
|
} else if (store->jwt_entry) {
|
||||||
|
memprintf(&err, "certificate '%s' in use for JWT validation, can't be deleted!\n", filename);
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
ebmb_delete(&store->node);
|
ebmb_delete(&store->node);
|
||||||
|
Loading…
Reference in New Issue
Block a user