summaryrefslogtreecommitdiff
path: root/kexdh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:16:32 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:16:32 +1100
commitdff5099f13e2e679b93d3cfe7073c9cd92b19b06 (patch)
treef80cf1916ad026e5550e61da139e52899fa04629 /kexdh.c
parent76e1e368b561cabeb55c21dc205c3f6805179ad5 (diff)
- markus@cvs.openbsd.org 2001/12/28 14:50:54
[auth1.c auth-rsa.c channels.c dispatch.c kex.c kexdh.c kexgex.c packet.c packet.h serverloop.c session.c ssh.c sshconnect1.c sshconnect2.c sshd.c] packet_read* no longer return the packet length, since it's not used.
Diffstat (limited to 'kexdh.c')
-rw-r--r--kexdh.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kexdh.c b/kexdh.c
index 226b81bc9..bc4700a2e 100644
--- a/kexdh.c
+++ b/kexdh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: kexdh.c,v 1.11 2001/12/28 13:57:33 markus Exp $"); 26RCSID("$OpenBSD: kexdh.c,v 1.12 2001/12/28 14:50:54 markus Exp $");
27 27
28#include <openssl/crypto.h> 28#include <openssl/crypto.h>
29#include <openssl/bn.h> 29#include <openssl/bn.h>
@@ -97,7 +97,6 @@ kexdh_client(Kex *kex)
97 u_char *server_host_key_blob = NULL, *signature = NULL; 97 u_char *server_host_key_blob = NULL, *signature = NULL;
98 u_char *kbuf, *hash; 98 u_char *kbuf, *hash;
99 u_int klen, kout, slen, sbloblen; 99 u_int klen, kout, slen, sbloblen;
100 int plen;
101 100
102 /* generate and send 'e', client DH public key */ 101 /* generate and send 'e', client DH public key */
103 dh = dh_new_group1(); 102 dh = dh_new_group1();
@@ -115,7 +114,7 @@ kexdh_client(Kex *kex)
115#endif 114#endif
116 115
117 debug("expecting SSH2_MSG_KEXDH_REPLY"); 116 debug("expecting SSH2_MSG_KEXDH_REPLY");
118 packet_read_expect(&plen, SSH2_MSG_KEXDH_REPLY); 117 packet_read_expect(SSH2_MSG_KEXDH_REPLY);
119 118
120 /* key, cert */ 119 /* key, cert */
121 server_host_key_blob = packet_get_string(&sbloblen); 120 server_host_key_blob = packet_get_string(&sbloblen);
@@ -201,14 +200,14 @@ kexdh_server(Kex *kex)
201 Key *server_host_key; 200 Key *server_host_key;
202 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 201 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
203 u_int sbloblen, klen, kout; 202 u_int sbloblen, klen, kout;
204 int slen, plen; 203 int slen;
205 204
206 /* generate server DH public key */ 205 /* generate server DH public key */
207 dh = dh_new_group1(); 206 dh = dh_new_group1();
208 dh_gen_key(dh, kex->we_need * 8); 207 dh_gen_key(dh, kex->we_need * 8);
209 208
210 debug("expecting SSH2_MSG_KEXDH_INIT"); 209 debug("expecting SSH2_MSG_KEXDH_INIT");
211 packet_read_expect(&plen, SSH2_MSG_KEXDH_INIT); 210 packet_read_expect(SSH2_MSG_KEXDH_INIT);
212 211
213 if (kex->load_host_key == NULL) 212 if (kex->load_host_key == NULL)
214 fatal("Cannot load hostkey"); 213 fatal("Cannot load hostkey");