version 1.35, 2005/07/27 10:39:03 |
version 1.35.2.2, 2006/10/06 03:19:32 |
|
|
|
/* $OpenBSD$ */ |
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
#include "includes.h" |
#include <sys/types.h> |
RCSID("$OpenBSD$"); |
|
|
|
#include <resolv.h> |
#include <netinet/in.h> |
|
|
#include <openssl/hmac.h> |
#include <openssl/hmac.h> |
#include <openssl/sha.h> |
#include <openssl/sha.h> |
|
|
#include "packet.h" |
#include <resolv.h> |
|
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
|
|
|
#include "xmalloc.h" |
#include "match.h" |
#include "match.h" |
#include "key.h" |
#include "key.h" |
#include "hostfile.h" |
#include "hostfile.h" |
#include "log.h" |
#include "log.h" |
#include "xmalloc.h" |
|
|
|
static int |
static int |
extract_salt(const char *s, u_int l, char *salt, size_t salt_len) |
extract_salt(const char *s, u_int l, char *salt, size_t salt_len) |
|
|
return (-1); |
return (-1); |
} |
} |
if (ret != SHA_DIGEST_LENGTH) { |
if (ret != SHA_DIGEST_LENGTH) { |
debug2("extract_salt: expected salt len %u, got %u", |
debug2("extract_salt: expected salt len %d, got %d", |
salt_len, ret); |
SHA_DIGEST_LENGTH, ret); |
return (-1); |
return (-1); |
} |
} |
|
|
|
|
|
|
if (key == NULL) { |
if (key == NULL) { |
/* we found a key of the requested type */ |
/* we found a key of the requested type */ |
if (found->type == keytype) |
if (found->type == keytype) { |
|
fclose(f); |
return HOST_FOUND; |
return HOST_FOUND; |
|
} |
continue; |
continue; |
} |
} |
|
|