mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 11:10:28 +09:00
Use new ssh options interface in keyfiles.
This commit is contained in:
@@ -1359,7 +1359,7 @@ static int match_hashed_host(SSH_SESSION *session, const char *host,
|
|||||||
* if host key is accepted\n
|
* if host key is accepted\n
|
||||||
* SSH_SERVER_ERROR: Some error happened
|
* SSH_SERVER_ERROR: Some error happened
|
||||||
*
|
*
|
||||||
* \see ssh_options_set_wanted_algo()
|
* \see ssh_options_set()
|
||||||
* \see ssh_get_pubkey_hash()
|
* \see ssh_get_pubkey_hash()
|
||||||
*
|
*
|
||||||
* \bug There is no current way to remove or modify an entry into the known
|
* \bug There is no current way to remove or modify an entry into the known
|
||||||
@@ -1375,7 +1375,7 @@ int ssh_is_server_known(SSH_SESSION *session) {
|
|||||||
|
|
||||||
enter_function();
|
enter_function();
|
||||||
|
|
||||||
if (ssh_options_default_known_hosts_file(session->options) < 0) {
|
if (ssh_options_set(session->options, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) {
|
||||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||||
"Can't find a known_hosts file");
|
"Can't find a known_hosts file");
|
||||||
leave_function();
|
leave_function();
|
||||||
@@ -1461,7 +1461,7 @@ int ssh_write_knownhost(SSH_SESSION *session) {
|
|||||||
char *dir;
|
char *dir;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
if (ssh_options_default_known_hosts_file(session->options) < 0) {
|
if (ssh_options_set(session->options, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) {
|
||||||
ssh_set_error(session, SSH_FATAL, "Cannot find known_hosts file.");
|
ssh_set_error(session, SSH_FATAL, "Cannot find known_hosts file.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user