summaryrefslogtreecommitdiff
path: root/kexecdhs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexecdhs.c')
-rw-r--r--kexecdhs.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/kexecdhs.c b/kexecdhs.c
index 4ba2072df..b9254eed7 100644
--- a/kexecdhs.c
+++ b/kexecdhs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexecdhs.c,v 1.20 2019/01/21 09:55:52 djm Exp $ */ 1/* $OpenBSD: kexecdhs.c,v 1.21 2019/01/21 10:05:09 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2010 Damien Miller. All rights reserved. 4 * Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -89,19 +89,9 @@ input_kex_ecdh_init(int type, u_int32_t seq, struct ssh *ssh)
89 sshkey_dump_ec_key(server_key); 89 sshkey_dump_ec_key(server_key);
90#endif 90#endif
91 91
92 if (kex->load_host_public_key == NULL || 92 if ((r = kex_load_hostkey(ssh, &server_host_private,
93 kex->load_host_private_key == NULL) { 93 &server_host_public)) != 0)
94 r = SSH_ERR_INVALID_ARGUMENT;
95 goto out; 94 goto out;
96 }
97 server_host_public = kex->load_host_public_key(kex->hostkey_type,
98 kex->hostkey_nid, ssh);
99 server_host_private = kex->load_host_private_key(kex->hostkey_type,
100 kex->hostkey_nid, ssh);
101 if (server_host_public == NULL) {
102 r = SSH_ERR_NO_HOSTKEY_LOADED;
103 goto out;
104 }
105 if ((client_public = EC_POINT_new(group)) == NULL) { 95 if ((client_public = EC_POINT_new(group)) == NULL) {
106 r = SSH_ERR_ALLOC_FAIL; 96 r = SSH_ERR_ALLOC_FAIL;
107 goto out; 97 goto out;