mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51:54 +00:00
Fixed SSH known hosts checking with older versions of libssh
This commit is contained in:
parent
2d99f12773
commit
f182771f96
@ -276,6 +276,12 @@ if test "$enable_libssh" != no ; then
|
|||||||
enable_libssh=no
|
enable_libssh=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_LIB([ssh], [ssh_session_is_known_server], [ssh_old_server_validation_api=no], [ssh_old_server_validation_api=yes])
|
||||||
|
|
||||||
|
if test "$ssh_old_server_validation_api" = yes; then
|
||||||
|
AC_DEFINE([HAVE_SSH_OLD_SERVER_VALIDATION_API], [1], [Define to 1 if ssh_session_is_known_server isn't defined])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$enable_mpls_kernel" != no ; then
|
if test "$enable_mpls_kernel" != no ; then
|
||||||
|
@ -1151,6 +1151,16 @@ sk_ssh_connect(sock *s)
|
|||||||
{
|
{
|
||||||
int server_identity_is_ok = 1;
|
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 */
|
/* Check server identity */
|
||||||
switch (ssh_session_is_known_server(s->ssh->session))
|
switch (ssh_session_is_known_server(s->ssh->session))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user