1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-10 02:09:25 +03:00

knownhosts: Add ssh_session_has_known_hosts_entry()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-02-03 16:53:21 +01:00
parent 32c49ea134
commit 963c46e4fb
3 changed files with 127 additions and 0 deletions

View File

@@ -238,6 +238,15 @@ enum ssh_server_known_e {
SSH_SERVER_FILE_NOT_FOUND
};
enum ssh_known_hosts_e {
SSH_KNOWN_HOSTS_ERROR = -2,
SSH_KNOWN_HOSTS_NOT_FOUND = -1,
SSH_KNOWN_HOSTS_UNKNOWN = 0,
SSH_KNOWN_HOSTS_OK,
SSH_KNOWN_HOSTS_CHANGED,
SSH_KNOWN_HOSTS_OTHER,
};
#ifndef MD5_DIGEST_LEN
#define MD5_DIGEST_LEN 16
#endif
@@ -527,6 +536,7 @@ LIBSSH_API void ssh_knownhosts_entry_free(struct ssh_knownhosts_entry *entry);
LIBSSH_API int ssh_known_hosts_parse_line(const char *host,
const char *line,
struct ssh_knownhosts_entry **entry);
LIBSSH_API enum ssh_known_hosts_e ssh_session_has_known_hosts_entry(ssh_session session);
/* LOGGING */
LIBSSH_API int ssh_set_log_level(int level);