summaryrefslogtreecommitdiffstats
path: root/hostfile.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-05-15 06:24:09 +0200
committerDamien Miller <djm@mindrot.org>2014-05-15 06:24:09 +0200
commit1f0311c7c7d10c94ff7f823de9c5b2ed79368b14 (patch)
treeae708c2a25f84a04bcb04f2dbf3e8039e0f692bc /hostfile.c
parent - djm@cvs.openbsd.org 2014/04/29 13:10:30 (diff)
downloadopenssh-1f0311c7c7d10c94ff7f823de9c5b2ed79368b14.tar.xz
openssh-1f0311c7c7d10c94ff7f823de9c5b2ed79368b14.zip
- markus@cvs.openbsd.org 2014/04/29 18:01:49
[auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c] [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c] [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c] make compiling against OpenSSL optional (make OPENSSL=no); reduces algorithms to curve25519, aes-ctr, chacha, ed25519; allows us to explore further options; with and ok djm
Diffstat (limited to 'hostfile.c')
-rw-r--r--hostfile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hostfile.c b/hostfile.c
index 8bc9540b7..91741cab8 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostfile.c,v 1.55 2014/01/31 16:39:19 tedu Exp $ */
+/* $OpenBSD: hostfile.c,v 1.56 2014/04/29 18:01:49 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -182,6 +182,7 @@ static int
hostfile_check_key(int bits, const Key *key, const char *host,
const char *filename, u_long linenum)
{
+#ifdef WITH_SSH1
if (key == NULL || key->type != KEY_RSA1 || key->rsa == NULL)
return 1;
if (bits != BN_num_bits(key->rsa->n)) {
@@ -191,6 +192,7 @@ hostfile_check_key(int bits, const Key *key, const char *host,
logit("Warning: replace %d with %d in %s, line %lu.",
bits, BN_num_bits(key->rsa->n), filename, linenum);
}
+#endif
return 1;
}
@@ -296,11 +298,15 @@ load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path)
key = key_new(KEY_UNSPEC);
if (!hostfile_read_key(&cp, &kbits, key)) {
key_free(key);
+#ifdef WITH_SSH1
key = key_new(KEY_RSA1);
if (!hostfile_read_key(&cp, &kbits, key)) {
key_free(key);
continue;
}
+#else
+ continue;
+#endif
}
if (!hostfile_check_key(kbits, key, host, path, linenum))
continue;