summaryrefslogtreecommitdiff
path: root/hostfile.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-04-30 23:10:43 +0000
committerDamien Miller <djm@mindrot.org>2017-05-01 09:37:40 +1000
commit56912dea6ef63dae4eb1194e5d88973a7c6c5740 (patch)
treec0425585449d257a90a42efce5f602f7ce16779f /hostfile.c
parentd4084cd230f7319056559b00db8b99296dad49d5 (diff)
upstream commit
unifdef WITH_SSH1 ok markus@ Upstream-ID: 9716e62a883ef8826c57f4d33b4a81a9cc7755c7
Diffstat (limited to 'hostfile.c')
-rw-r--r--hostfile.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/hostfile.c b/hostfile.c
index e23faa969..b8f9cd143 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.c,v 1.68 2017/03/10 04:26:06 djm Exp $ */ 1/* $OpenBSD: hostfile.c,v 1.69 2017/04/30 23:10:43 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -789,20 +789,7 @@ hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx,
789 break; 789 break;
790 } 790 }
791 if (!hostfile_read_key(&cp, &kbits, lineinfo.key)) { 791 if (!hostfile_read_key(&cp, &kbits, lineinfo.key)) {
792#ifdef WITH_SSH1
793 sshkey_free(lineinfo.key);
794 lineinfo.key = sshkey_new(KEY_RSA1);
795 if (lineinfo.key == NULL) {
796 error("%s: sshkey_new fail", __func__);
797 r = SSH_ERR_ALLOC_FAIL;
798 break;
799 }
800 if (!hostfile_read_key(&cp, &kbits,
801 lineinfo.key))
802 goto bad;
803#else
804 goto bad; 792 goto bad;
805#endif
806 } 793 }
807 lineinfo.keytype = lineinfo.key->type; 794 lineinfo.keytype = lineinfo.key->type;
808 lineinfo.comment = cp; 795 lineinfo.comment = cp;