mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
knownhosts: Take StrictHostKeyChecking option into account
Signed-off-by: Sanne Raymaekers <sraymaek@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
03c30e9c8a
commit
67f418218b
@@ -883,6 +883,9 @@ ssh_session_get_known_hosts_entry(ssh_session session,
|
||||
|
||||
/* If we did not find any match at all: we report the previous result */
|
||||
if (rv == SSH_KNOWN_HOSTS_UNKNOWN) {
|
||||
if (session->opts.StrictHostKeyChecking == 0) {
|
||||
return SSH_KNOWN_HOSTS_OK;
|
||||
}
|
||||
return old_rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user