diff options
author | Maria Matejka <mq@ucw.cz> | 2022-10-12 10:52:53 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-10-12 11:01:38 +0200 |
commit | f182771f96280115e839315d9d3e5aa7c9343d54 (patch) | |
tree | 51b7f28a22259189d4df8a9c820e155515f7542e /sysdep/unix | |
parent | 2d99f1277317040d05cca7b8f04b43a66f6fe643 (diff) |
Fixed SSH known hosts checking with older versions of libssh
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index fb25d5d8..c91bd597 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1151,6 +1151,16 @@ sk_ssh_connect(sock *s) { int server_identity_is_ok = 1; +#ifdef HAVE_SSH_OLD_SERVER_VALIDATION_API +#define ssh_session_is_known_server ssh_is_server_known +#define SSH_KNOWN_HOSTS_OK SSH_SERVER_KNOWN_OK +#define SSH_KNOWN_HOSTS_UNKNOWN SSH_SERVER_NOT_KNOWN +#define SSH_KNOWN_HOSTS_CHANGED SSH_SERVER_KNOWN_CHANGED +#define SSH_KNOWN_HOSTS_NOT_FOUND SSH_SERVER_FILE_NOT_FOUND +#define SSH_KNOWN_HOSTS_ERROR SSH_SERVER_ERROR +#define SSH_KNOWN_HOSTS_OTHER SSH_SERVER_FOUND_OTHER +#endif + /* Check server identity */ switch (ssh_session_is_known_server(s->ssh->session)) { |