1 /* $OpenBSD: hostfile.h,v 1.19 2010/11/29 23:45:51 djm Exp $ */
4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
18 HOST_OK
, HOST_NEW
, HOST_CHANGED
, HOST_REVOKED
, HOST_FOUND
22 MRK_ERROR
, MRK_NONE
, MRK_REVOKE
, MRK_CA
25 struct hostkey_entry
{
34 struct hostkeys
*init_hostkeys(void);
35 void load_hostkeys(struct hostkeys
*, const char *, const char *);
36 void free_hostkeys(struct hostkeys
*);
38 HostStatus
check_key_in_hostkeys(struct hostkeys
*, Key
*,
39 const struct hostkey_entry
**);
40 int lookup_key_in_hostkeys_by_type(struct hostkeys
*, int,
41 const struct hostkey_entry
**);
43 int hostfile_read_key(char **, u_int
*, Key
*);
44 int add_host_to_hostfile(const char *, const char *, const Key
*, int);
46 #define HASH_MAGIC "|1|"
47 #define HASH_DELIM '|'
49 #define CA_MARKER "@cert-authority"
50 #define REVOKE_MARKER "@revoked"
52 char *host_hash(const char *, const char *, u_int
);