hostfile.h revision 76259
176259Sgreen/* $OpenBSD: hostfile.h,v 1.7 2001/02/08 19:30:51 itojun Exp $ */ 276259Sgreen 365668Skris/* 465668Skris * Author: Tatu Ylonen <ylo@cs.hut.fi> 565668Skris * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 665668Skris * All rights reserved 765668Skris * 865668Skris * As far as I am concerned, the code I have written for this software 965668Skris * can be used freely for any purpose. Any derived versions of this 1065668Skris * software must be clearly marked as such, and if the derived work is 1165668Skris * incompatible with the protocol description in the RFC file, it must be 1265668Skris * called by a name other than "ssh" or "Secure Shell". 1365668Skris */ 1458582Skris#ifndef HOSTFILE_H 1558582Skris#define HOSTFILE_H 1658582Skris 1776259Sgreenint 1876259Sgreenauth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); 1976259Sgreen 2058582Skris/* 2158582Skris * Checks whether the given host is already in the list of our known hosts. 2258582Skris * Returns HOST_OK if the host is known and has the specified key, HOST_NEW 2358582Skris * if the host is not known, and HOST_CHANGED if the host is known but used 2458582Skris * to have a different host key. The host must be in all lowercase. 2558582Skris */ 2658582Skristypedef enum { 2758582Skris HOST_OK, HOST_NEW, HOST_CHANGED 2858582Skris} HostStatus; 2976259Sgreen 3060573SkrisHostStatus 3176259Sgreencheck_host_in_hostfile(const char *filename, const char *host, Key *key, 3276259Sgreen Key *found, int *line); 3358582Skris 3458582Skris/* 3558582Skris * Appends an entry to the host file. Returns false if the entry could not 3658582Skris * be appended. 3758582Skris */ 3858582Skrisint add_host_to_hostfile(const char *filename, const char *host, Key *key); 3958582Skris 4058582Skris#endif 41