diff options
Diffstat (limited to 'kexdh.c')
-rw-r--r-- | kexdh.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kexdh.c,v 1.11 2001/12/28 13:57:33 markus Exp $"); | 26 | RCSID("$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"); |