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.
This commit is contained in:
William Lallemand 2019-10-17 16:23:50 +02:00 committed by William Lallemand
parent 96a9c97369
commit 849eed6b25
1 changed files with 5 additions and 1 deletions

View 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