]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl/cli: fix looking up for a bundle
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2019 14:23:50 +0000 (16:23 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 23 Oct 2019 09:54:51 +0000 (11:54 +0200)
If we want a bundle but we didn't find a bundle, we shouldn't try to
apply the changes.

src/ssl_sock.c

index f8e60c31fcfb3845ae66f6c54505e45d2a357729..e537e61686ff390845968e8f354c1e344a9b8cb6 100644 (file)
@@ -9778,7 +9778,7 @@ static int cli_parse_set_cert(char **args, char *payload, struct appctx *appctx,
        char *err = NULL;
        int i;
        int found = 0;
-       int bundle = -1;
+       int bundle = -1; /* TRUE if >= 0 (ckch index) */
        int errcode = 0;
 
        if (!*args[3] || !payload)
@@ -9805,6 +9805,10 @@ static int cli_parse_set_cert(char **args, char *payload, struct appctx *appctx,
                                goto end;
                        }
 
+                        /* If we want a bundle but this is not a bundle */
+                       if (bundle >= 0 && ckchs->multi == 0)
+                               continue;
+
                        if (bundle < 0)
                                ckch = ckchs->ckch;
                        else