summaryrefslogtreecommitdiffstats
path: root/kexecdhs.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-20 08:55:33 +0100
committerDamien Miller <djm@mindrot.org>2015-01-20 08:58:36 +0100
commite2cc6bef08941256817d44d146115b3478586ad4 (patch)
tree4ee22a5f23b07e695d76ee31c959f1fde1792081 /kexecdhs.c
parentfix kex test (diff)
downloadopenssh-e2cc6bef08941256817d44d146115b3478586ad4.tar.xz
openssh-e2cc6bef08941256817d44d146115b3478586ad4.zip
upstream commit
fix hostkeys in agent; ok markus@
Diffstat (limited to 'kexecdhs.c')
-rw-r--r--kexecdhs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kexecdhs.c b/kexecdhs.c
index 6b8d95d9c..f47a7b207 100644
--- a/kexecdhs.c
+++ b/kexecdhs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhs.c,v 1.12 2015/01/19 20:16:15 markus Exp $ */
+/* $OpenBSD: kexecdhs.c,v 1.13 2015/01/20 07:55:33 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -95,10 +95,9 @@ input_kex_ecdh_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;
}