summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-01-20 07:55:34 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-01-20 07:55:34 +0000
commit2fea43eabd6e45024e6ae1d221efd9961cd2ce1d (patch)
treef9f2ca906f19c8e7877842e889fb886402523625 /usr.bin
parenta6bf08d1bf3e5975f97dcb6744a285bb831f5de3 (diff)
fix hostkeys in agent; ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/kexc25519s.c9
-rw-r--r--usr.bin/ssh/kexdhs.c9
-rw-r--r--usr.bin/ssh/kexecdhs.c9
-rw-r--r--usr.bin/ssh/kexgexs.c9
4 files changed, 16 insertions, 20 deletions
diff --git a/usr.bin/ssh/kexc25519s.c b/usr.bin/ssh/kexc25519s.c
index 7dd5bb82675..867b6e75516 100644
--- a/usr.bin/ssh/kexc25519s.c
+++ b/usr.bin/ssh/kexc25519s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexc25519s.c,v 1.6 2015/01/19 20:16:15 markus Exp $ */
+/* $OpenBSD: kexc25519s.c,v 1.7 2015/01/20 07:55:33 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -73,10 +73,9 @@ input_kex_c25519_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;
}
diff --git a/usr.bin/ssh/kexdhs.c b/usr.bin/ssh/kexdhs.c
index 1ac5a4e16d1..0ceea560c73 100644
--- a/usr.bin/ssh/kexdhs.c
+++ b/usr.bin/ssh/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.
*
@@ -96,10 +96,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;
}
diff --git a/usr.bin/ssh/kexecdhs.c b/usr.bin/ssh/kexecdhs.c
index e46e7a290f4..48e9226730e 100644
--- a/usr.bin/ssh/kexecdhs.c
+++ b/usr.bin/ssh/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.
@@ -91,10 +91,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;
}
diff --git a/usr.bin/ssh/kexgexs.c b/usr.bin/ssh/kexgexs.c
index c77403ba845..92a89d64f94 100644
--- a/usr.bin/ssh/kexgexs.c
+++ b/usr.bin/ssh/kexgexs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexgexs.c,v 1.21 2015/01/19 20:16:15 markus Exp $ */
+/* $OpenBSD: kexgexs.c,v 1.22 2015/01/20 07:55:33 djm Exp $ */
/*
* Copyright (c) 2000 Niels Provos. All rights reserved.
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -155,10 +155,9 @@ input_kex_dh_gex_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;
}