mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-16 22:58:02 +00:00
BUG/MEDIUM: ssl_ckch: Don't delete a cert entry if it is being modified
When a certificate entry is being modified, we must take care to no delete it because the corresponding ongoing transaction still references it. If we do so, it leads to a null-deref and a crash may be exeperienced if changes are commited. This patch must be backported as far as 2.2.
This commit is contained in:
parent
4329dcc2fc
commit
926fefca8d
@ -2502,6 +2502,11 @@ static int cli_parse_del_cert(char **args, char *payload, struct appctx *appctx,
|
||||
|
||||
filename = args[3];
|
||||
|
||||
if (ckchs_transaction.path && strcmp(ckchs_transaction.path, filename) == 0) {
|
||||
memprintf(&err, "ongoing transaction for the certificate '%s'", filename);
|
||||
goto error;
|
||||
}
|
||||
|
||||
store = ckchs_lookup(filename);
|
||||
if (store == NULL) {
|
||||
memprintf(&err, "certificate '%s' doesn't exist!\n", filename);
|
||||
|
Loading…
Reference in New Issue
Block a user