diff options
author | kris <kris@FreeBSD.org> | 2000-03-26 07:07:24 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-03-26 07:07:24 +0000 |
commit | b201b15ee1575ab28ed4f9b5a7d430e835a7c7ae (patch) | |
tree | 561c850bc04e7b62c9fc641be89ac412589219c1 /crypto/openssh/hostfile.h | |
parent | fc557ff7d97438559e69347575f5aa8ef03a5f50 (diff) | |
download | FreeBSD-src-b201b15ee1575ab28ed4f9b5a7d430e835a7c7ae.zip FreeBSD-src-b201b15ee1575ab28ed4f9b5a7d430e835a7c7ae.tar.gz |
Virgin import of OpenSSH sources dated 2000/03/25
Diffstat (limited to 'crypto/openssh/hostfile.h')
-rw-r--r-- | crypto/openssh/hostfile.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/openssh/hostfile.h b/crypto/openssh/hostfile.h new file mode 100644 index 0000000..64fe185 --- /dev/null +++ b/crypto/openssh/hostfile.h @@ -0,0 +1,22 @@ +#ifndef HOSTFILE_H +#define HOSTFILE_H + +/* + * Checks whether the given host is already in the list of our known hosts. + * Returns HOST_OK if the host is known and has the specified key, HOST_NEW + * if the host is not known, and HOST_CHANGED if the host is known but used + * to have a different host key. The host must be in all lowercase. + */ +typedef enum { + HOST_OK, HOST_NEW, HOST_CHANGED +} HostStatus; +HostStatus +check_host_in_hostfile(const char *filename, const char *host, Key *key, Key *found); + +/* + * Appends an entry to the host file. Returns false if the entry could not + * be appended. + */ +int add_host_to_hostfile(const char *filename, const char *host, Key *key); + +#endif |