summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c
index 65f90b8b4..5c2b7217f 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.274 2015/07/01 02:26:31 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus 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
@@ -100,6 +100,7 @@
100#include "key.h" 100#include "key.h"
101#include "cipher.h" 101#include "cipher.h"
102#include "kex.h" 102#include "kex.h"
103#include "myproposal.h"
103#include "log.h" 104#include "log.h"
104#include "misc.h" 105#include "misc.h"
105#include "readconf.h" 106#include "readconf.h"
@@ -2382,10 +2383,11 @@ client_input_hostkeys(void)
2382 debug3("%s: received %s key %s", __func__, 2383 debug3("%s: received %s key %s", __func__,
2383 sshkey_type(key), fp); 2384 sshkey_type(key), fp);
2384 free(fp); 2385 free(fp);
2386
2385 /* Check that the key is accepted in HostkeyAlgorithms */ 2387 /* Check that the key is accepted in HostkeyAlgorithms */
2386 if (options.hostkeyalgorithms != NULL && 2388 if (match_pattern_list(sshkey_ssh_name(key),
2387 match_pattern_list(sshkey_ssh_name(key), 2389 options.hostkeyalgorithms ? options.hostkeyalgorithms :
2388 options.hostkeyalgorithms, 0) != 1) { 2390 KEX_DEFAULT_PK_ALG, 0) != 1) {
2389 debug3("%s: %s key not permitted by HostkeyAlgorithms", 2391 debug3("%s: %s key not permitted by HostkeyAlgorithms",
2390 __func__, sshkey_ssh_name(key)); 2392 __func__, sshkey_ssh_name(key));
2391 continue; 2393 continue;