summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2020-01-29 08:17:50 +0000
committerDamien Miller <djm@cvs.openbsd.org>2020-01-29 08:17:50 +0000
commitcc113646ab0673e3aa97b51348375ce06fbebdec (patch)
treeab64ffbdd8f9d08a6b711cddafd0ea760eae3fc4 /usr.bin/ssh/clientloop.c
parent3d162dba4484f81e947c6e65196ccf72a138ea97 (diff)
markus suggests a simplification to previous
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 9641d4f1dde..b936fc874e5 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.336 2020/01/29 07:51:30 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.337 2020/01/29 08:17:49 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1874,11 +1874,8 @@ hostkeys_find(struct hostkey_foreach_line *l, void *_ctx)
}
static void
-hostkey_change_preamble(void)
+hostkey_change_preamble(LogLevel loglevel)
{
- LogLevel loglevel = options.update_hostkeys == SSH_UPDATE_HOSTKEYS_ASK ?
- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_VERBOSE;
-
do_log2(loglevel, "The server has updated its host keys.");
do_log2(loglevel, "These changes were verified by the server's "
"existing trusted key.");
@@ -1901,7 +1898,7 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
fatal("%s: sshkey_fingerprint failed", __func__);
if (first && asking)
- hostkey_change_preamble();
+ hostkey_change_preamble(loglevel);
do_log2(loglevel, "Learned new hostkey: %s %s",
sshkey_type(ctx->keys[i]), fp);
first = 0;
@@ -1912,7 +1909,7 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
fatal("%s: sshkey_fingerprint failed", __func__);
if (first && asking)
- hostkey_change_preamble();
+ hostkey_change_preamble(loglevel);
do_log2(loglevel, "Deprecating obsolete hostkey: %s %s",
sshkey_type(ctx->old_keys[i]), fp);
first = 0;