From: William Lallemand Date: Thu, 17 Oct 2019 14:23:50 +0000 (+0200) Subject: BUG/MINOR: ssl/cli: fix looking up for a bundle X-Git-Tag: v2.1-dev3~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=849eed6b25fb0d4f5c350158ae02d0ca8d4b4618;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl/cli: fix looking up for a bundle If we want a bundle but we didn't find a bundle, we shouldn't try to apply the changes. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index f8e60c31fc..e537e61686 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -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