diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-03-31 22:57:07 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-03-31 22:57:07 +0000 |
commit | 6bdd3a0ec208fb0d450565bdafc56bdab41fa3fd (patch) | |
tree | 28b04fd2a70fa8fd6316afcd112d080f49c96aea | |
parent | c3259ce00eb840931bf1c090085a186795dc1515 (diff) |
downgrade error() for known_hosts parse errors to debug() to quiet
warnings from ssh1 keys present when compiled !ssh1.
also identify ssh1 keys when scanning, even when compiled !ssh1
ok markus@ miod@
-rw-r--r-- | usr.bin/ssh/hostfile.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c index b067bfc97a5..3df8e99437b 100644 --- a/usr.bin/ssh/hostfile.c +++ b/usr.bin/ssh/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.64 2015/02/16 22:08:57 djm Exp $ */ +/* $OpenBSD: hostfile.c,v 1.65 2015/03/31 22:57:06 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -239,7 +239,8 @@ record_hostkey(struct hostkey_foreach_line *l, void *_ctx) struct hostkey_entry *tmp; if (l->status == HKF_STATUS_INVALID) { - error("%s:%ld: parse error in hostkeys file", + /* XXX make this verbose() in the future */ + debug("%s:%ld: parse error in hostkeys file", l->path, l->linenum); return 0; } @@ -807,7 +808,7 @@ hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx, memcpy(ktype, lineinfo.rawkey, l); ktype[l] = '\0'; lineinfo.keytype = sshkey_type_from_name(ktype); -#ifdef WITH_SSH1 + /* * Assume RSA1 if the first component is a short * decimal number. @@ -815,7 +816,7 @@ hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx, if (lineinfo.keytype == KEY_UNSPEC && l < 8 && strspn(ktype, "0123456789") == l) lineinfo.keytype = KEY_RSA1; -#endif + /* * Check that something other than whitespace follows * the key type. This won't catch all corruption, but |