Support build with older libssh.

The function ssh_session_is_known_server() was introduced later,
fallback to older version if libssh is available.
This commit is contained in:
Milan Broz
2021-07-25 21:56:37 +02:00
parent 5d1972bb97
commit 508284cd28
2 changed files with 5 additions and 0 deletions

View File

@@ -123,7 +123,11 @@ ssh_session sshplugin_session_init(struct crypt_device *cd, const char *host, co
goto out;
}
#if HAVE_DECL_SSH_SESSION_IS_KNOWN_SERVER
r = ssh_session_is_known_server(ssh);
#else
r = ssh_is_server_known(ssh);
#endif
if (r != SSH_SERVER_KNOWN_OK) {
crypt_log(cd, CRYPT_LOG_ERROR, _("Server not known: "));
r = SSH_AUTH_ERROR;