diff options
Diffstat (limited to 'usr.bin/ssh/sshconnect2.c')
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 1abd3aac182..0a3e29ee343 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.336 2020/11/13 07:30:44 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.337 2020/12/20 23:36:51 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -124,10 +124,11 @@ order_hostkeyalgs(char *host, struct sockaddr *hostaddr, u_short port) get_hostfile_hostname_ipaddr(host, hostaddr, port, &hostname, NULL); hostkeys = init_hostkeys(); for (i = 0; i < options.num_user_hostfiles; i++) - load_hostkeys(hostkeys, hostname, options.user_hostfiles[i]); - for (i = 0; i < options.num_system_hostfiles; i++) - load_hostkeys(hostkeys, hostname, options.system_hostfiles[i]); - + load_hostkeys(hostkeys, hostname, options.user_hostfiles[i], 0); + for (i = 0; i < options.num_system_hostfiles; i++) { + load_hostkeys(hostkeys, hostname, + options.system_hostfiles[i], 0); + } /* * If a plain public key exists that matches the type of the best * preference HostkeyAlgorithms, then use the whole list as is. |