+/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include "includes.h"
-#include <resolv.h>
+#include <sys/types.h>
+
+#include <netinet/in.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
+#include <resolv.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xmalloc.h"
#include "match.h"
#include "key.h"
#include "hostfile.h"
#include "log.h"
-#include "xmalloc.h"
static int
extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
if (key == NULL) {
/* we found a key of the requested type */
- if (found->type == keytype)
+ if (found->type == keytype) {
+ fclose(f);
return HOST_FOUND;
+ }
continue;
}