mirror of
https://github.com/curl/curl.git
synced 2026-07-24 21:17:36 +03:00
libssh: set both knownhosts options to the same file
Reported-by: Harry Sintonen Closes #20092
This commit is contained in:
parent
c882439d53
commit
adca486c12
1 changed files with 5 additions and 0 deletions
|
|
@ -2629,6 +2629,11 @@ static CURLcode myssh_connect(struct Curl_easy *data, bool *done)
|
|||
infof(data, "Known hosts: %s", data->set.str[STRING_SSH_KNOWNHOSTS]);
|
||||
rc = ssh_options_set(sshc->ssh_session, SSH_OPTIONS_KNOWNHOSTS,
|
||||
data->set.str[STRING_SSH_KNOWNHOSTS]);
|
||||
if(rc == SSH_OK)
|
||||
/* libssh has two separate options for this. Set both to the same file
|
||||
to avoid surprises */
|
||||
rc = ssh_options_set(sshc->ssh_session, SSH_OPTIONS_GLOBAL_KNOWNHOSTS,
|
||||
data->set.str[STRING_SSH_KNOWNHOSTS]);
|
||||
if(rc != SSH_OK) {
|
||||
failf(data, "Could not set known hosts file path");
|
||||
return CURLE_FAILED_INIT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue