]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Fri, 17 Jul 2015 02:47:45 +0000 (02:47 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 17 Jul 2015 02:48:15 +0000 (12:48 +1000)
fix incorrect test for SSH1 keys when compiled without SSH1
 support

Upstream-ID: 6004d720345b8e481c405e8ad05ce2271726e451

sshd.c

diff --git a/sshd.c b/sshd.c
index 4bb34b101b966d66f4a71f742ebd0e1ecb315187..5c7c6c2218b21324cc11ef6c28b92b5ce363d44a 100644 (file)
--- a/sshd.c
+++ b/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
@@ -798,7 +798,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),