mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
MINOR: ssl: display libssl errors on private key loading
Display a more precise error message from the libssl when a private key can't be loaded correctly.
This commit is contained in:
parent
9b1faee4c9
commit
0ebef67132
1 changed files with 4 additions and 2 deletions
|
|
@ -628,8 +628,10 @@ int ssl_sock_load_key_into_ckch(const char *path, char *buf, struct ckch_data *d
|
|||
} while (!key && cb_data.passphrase_idx != -1 && cb_data.callback_called);
|
||||
|
||||
if (key == NULL) {
|
||||
memprintf(err, "%sunable to load private key from file '%s'.\n",
|
||||
err && *err ? *err : "", path);
|
||||
unsigned long e = ERR_peek_last_error();
|
||||
|
||||
memprintf(err, "%sunable to load private key from file '%s' (%s).\n",
|
||||
err && *err ? *err : "", path, ERR_error_string(e, NULL));
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue