summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-07-17 02:47:45 +0000
committerdjm <djm@openbsd.org>2015-07-17 02:47:45 +0000
commit32d1ab1e459ff9cbe4ae539644aa2d67d919956a (patch)
tree7ca40d7dc02bd8974d580395dfd8ba8ceee26c04
parentadd missing ELEM_CHECK for csa printing, spotted by / ok stsp@ (diff)
downloadwireguard-openbsd-32d1ab1e459ff9cbe4ae539644aa2d67d919956a.tar.xz
wireguard-openbsd-32d1ab1e459ff9cbe4ae539644aa2d67d919956a.zip
fix incorrect test for SSH1 keys when compiled without SSH1 support
-rw-r--r--usr.bin/ssh/sshd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index e01665a754f..0b7115fc4cd 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.455 2015/07/15 08:00:11 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.456 2015/07/17 02:47:45 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -761,7 +761,7 @@ list_hostkey_types(void)
key = sensitive_data.host_keys[i];
if (key == NULL)
key = sensitive_data.host_pubkeys[i];
- if (key == NULL && key->type != KEY_RSA1)
+ if (key == NULL || key->type == KEY_RSA1)
continue;
/* Check that the key is accepted in HostkeyAlgorithms */
if (match_pattern_list(sshkey_ssh_name(key),