summaryrefslogtreecommitdiff
path: root/crypto/openssh/clientloop.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2016-01-20 22:57:10 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2016-01-20 22:57:10 +0000
commiteccfee6ebc28c335f2a2b9db7736dc1961131b04 (patch)
treec90d6531b4082060e49583793ca124b381f7ffd6 /crypto/openssh/clientloop.c
parentbd3f34d4ba691b1bbc79269f992c5ae666b9404e (diff)
parentd994eeedda788efc28b630e10a33548453293473 (diff)
downloadsrc-test2-eccfee6ebc28c335f2a2b9db7736dc1961131b04.tar.gz
src-test2-eccfee6ebc28c335f2a2b9db7736dc1961131b04.zip
Notes
Diffstat (limited to 'crypto/openssh/clientloop.c')
-rw-r--r--crypto/openssh/clientloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/openssh/clientloop.c b/crypto/openssh/clientloop.c
index e6da12a63404..21cc822e7988 100644
--- a/crypto/openssh/clientloop.c
+++ b/crypto/openssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.274 2015/07/01 02:26:31 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -101,6 +101,7 @@ __RCSID("$FreeBSD$");
#include "key.h"
#include "cipher.h"
#include "kex.h"
+#include "myproposal.h"
#include "log.h"
#include "misc.h"
#include "readconf.h"
@@ -2363,10 +2364,11 @@ client_input_hostkeys(void)
debug3("%s: received %s key %s", __func__,
sshkey_type(key), fp);
free(fp);
+
/* Check that the key is accepted in HostkeyAlgorithms */
- if (options.hostkeyalgorithms != NULL &&
- match_pattern_list(sshkey_ssh_name(key),
- options.hostkeyalgorithms, 0) != 1) {
+ if (match_pattern_list(sshkey_ssh_name(key),
+ options.hostkeyalgorithms ? options.hostkeyalgorithms :
+ KEX_DEFAULT_PK_ALG, 0) != 1) {
debug3("%s: %s key not permitted by HostkeyAlgorithms",
__func__, sshkey_ssh_name(key));
continue;