mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-25 12:51:21 +01:00
BUG/MINOR: ssl/cli: fix an error when a file is not found
When trying to update a certificate <file>.{rsa,ecdsa,dsa}, but this one
does not exist and if <file> was used as a regular file in the
configuration, the error was ambiguous. Correct it so we can return a
certificate not found error.
This commit is contained in:
parent
37031b85ca
commit
3246d9466a
@ -10307,10 +10307,13 @@ static int cli_parse_set_cert(char **args, char *payload, struct appctx *appctx,
|
|||||||
errcode |= ERR_ALERT | ERR_FATAL;
|
errcode |= ERR_ALERT | ERR_FATAL;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
/* If we want a bundle but this is not a bundle */
|
/* If we want a bundle but this is not a bundle
|
||||||
/* note that it should never happen */
|
* example: When you try to update <file>.rsa, but
|
||||||
if (bundle >= 0 && find_ckchs[i]->multi == 0)
|
* <file> is a regular file */
|
||||||
goto end;
|
if (bundle >= 0 && find_ckchs[i]->multi == 0) {
|
||||||
|
find_ckchs[i] = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#if HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL
|
#if HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user