summaryrefslogtreecommitdiffstats
path: root/kexdhs.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-20 07:55:33 +0000
committerDamien Miller <djm@mindrot.org>2015-01-20 18:58:36 +1100
commite2cc6bef08941256817d44d146115b3478586ad4 (patch)
tree4ee22a5f23b07e695d76ee31c959f1fde1792081 /kexdhs.c
parent1ca3e2155aa5d3801a7ae050f85c71f41fcb95b1 (diff)
upstream commit
fix hostkeys in agent; ok markus@
Diffstat (limited to 'kexdhs.c')
-rw-r--r--kexdhs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kexdhs.c b/kexdhs.c
index 182657ac..0bfa08b0 100644
--- a/kexdhs.c
+++ b/kexdhs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexdhs.c,v 1.20 2015/01/19 20:16:15 markus Exp $ */
+/* $OpenBSD: kexdhs.c,v 1.21 2015/01/20 07:55:33 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -101,10 +101,9 @@ input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
r = SSH_ERR_INVALID_ARGUMENT;
goto out;
}
- if ((server_host_public = kex->load_host_public_key(kex->hostkey_type,
- ssh)) == NULL ||
- (server_host_private = kex->load_host_private_key(kex->hostkey_type,
- ssh)) == NULL) {
+ server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
+ server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
+ if (server_host_public == NULL) {
r = SSH_ERR_NO_HOSTKEY_LOADED;
goto out;
}