]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ssl: check if a transaction exists once before setting it
authorWilliam Dauchy <w.dauchy@criteo.com>
Sun, 24 Nov 2019 14:04:20 +0000 (15:04 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 25 Nov 2019 07:58:44 +0000 (08:58 +0100)
trivial patch to fix issue #351

Fixes: bc6ca7ccaa72 ("MINOR: ssl/cli: rework 'set ssl cert' as 'set/commit'")
Reported-by: Илья Шипицин <chipitsine@gmail.com>
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
src/ssl_sock.c

index cd04c344a5a6ffff692cf3362a6b93ef76cc2623..62b9de95c399914b630caeff01eefd452199f84f 100644 (file)
@@ -10468,7 +10468,7 @@ static int cli_parse_set_cert(char **args, char *payload, struct appctx *appctx,
        /* we succeed, we can save the ckchs in the transaction */
 
        /* if there wasn't a transaction, update the old ckchs */
-       if (!ckchs_transaction.old_ckchs && !ckchs_transaction.old_ckchs) {
+       if (!ckchs_transaction.old_ckchs) {
                ckchs_transaction.old_ckchs = appctx->ctx.ssl.old_ckchs;
                ckchs_transaction.path = appctx->ctx.ssl.path;
                err = memprintf(&err, "Transaction created for certificate %s!\n", ckchs_transaction.path);