diff options
Diffstat (limited to 'kexgex.c')
-rw-r--r-- | kexgex.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: kexgex.c,v 1.14 2001/12/28 13:57:33 markus Exp $"); | 27 | RCSID("$OpenBSD: kexgex.c,v 1.15 2001/12/28 14:50:54 markus Exp $"); |
28 | 28 | ||
29 | #include <openssl/bn.h> | 29 | #include <openssl/bn.h> |
30 | 30 | ||
@@ -107,7 +107,7 @@ kexgex_client(Kex *kex) | |||
107 | Key *server_host_key; | 107 | Key *server_host_key; |
108 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; | 108 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; |
109 | u_int klen, kout, slen, sbloblen; | 109 | u_int klen, kout, slen, sbloblen; |
110 | int plen, min, max, nbits; | 110 | int min, max, nbits; |
111 | DH *dh; | 111 | DH *dh; |
112 | 112 | ||
113 | nbits = dh_estimate(kex->we_need * 8); | 113 | nbits = dh_estimate(kex->we_need * 8); |
@@ -138,7 +138,7 @@ kexgex_client(Kex *kex) | |||
138 | packet_send(); | 138 | packet_send(); |
139 | 139 | ||
140 | debug("expecting SSH2_MSG_KEX_DH_GEX_GROUP"); | 140 | debug("expecting SSH2_MSG_KEX_DH_GEX_GROUP"); |
141 | packet_read_expect(&plen, SSH2_MSG_KEX_DH_GEX_GROUP); | 141 | packet_read_expect(SSH2_MSG_KEX_DH_GEX_GROUP); |
142 | 142 | ||
143 | if ((p = BN_new()) == NULL) | 143 | if ((p = BN_new()) == NULL) |
144 | fatal("BN_new"); | 144 | fatal("BN_new"); |
@@ -169,7 +169,7 @@ kexgex_client(Kex *kex) | |||
169 | packet_send(); | 169 | packet_send(); |
170 | 170 | ||
171 | debug("expecting SSH2_MSG_KEX_DH_GEX_REPLY"); | 171 | debug("expecting SSH2_MSG_KEX_DH_GEX_REPLY"); |
172 | packet_read_expect(&plen, SSH2_MSG_KEX_DH_GEX_REPLY); | 172 | packet_read_expect(SSH2_MSG_KEX_DH_GEX_REPLY); |
173 | 173 | ||
174 | /* key, cert */ | 174 | /* key, cert */ |
175 | server_host_key_blob = packet_get_string(&sbloblen); | 175 | server_host_key_blob = packet_get_string(&sbloblen); |
@@ -261,7 +261,7 @@ kexgex_server(Kex *kex) | |||
261 | DH *dh = dh; | 261 | DH *dh = dh; |
262 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; | 262 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; |
263 | u_int sbloblen, klen, kout; | 263 | u_int sbloblen, klen, kout; |
264 | int min = -1, max = -1, nbits = -1, type, plen, slen; | 264 | int min = -1, max = -1, nbits = -1, type, slen; |
265 | 265 | ||
266 | if (kex->load_host_key == NULL) | 266 | if (kex->load_host_key == NULL) |
267 | fatal("Cannot load hostkey"); | 267 | fatal("Cannot load hostkey"); |
@@ -269,7 +269,7 @@ kexgex_server(Kex *kex) | |||
269 | if (server_host_key == NULL) | 269 | if (server_host_key == NULL) |
270 | fatal("Unsupported hostkey type %d", kex->hostkey_type); | 270 | fatal("Unsupported hostkey type %d", kex->hostkey_type); |
271 | 271 | ||
272 | type = packet_read(&plen); | 272 | type = packet_read(); |
273 | switch (type) { | 273 | switch (type) { |
274 | case SSH2_MSG_KEX_DH_GEX_REQUEST: | 274 | case SSH2_MSG_KEX_DH_GEX_REQUEST: |
275 | debug("SSH2_MSG_KEX_DH_GEX_REQUEST received"); | 275 | debug("SSH2_MSG_KEX_DH_GEX_REQUEST received"); |
@@ -312,7 +312,7 @@ kexgex_server(Kex *kex) | |||
312 | dh_gen_key(dh, kex->we_need * 8); | 312 | dh_gen_key(dh, kex->we_need * 8); |
313 | 313 | ||
314 | debug("expecting SSH2_MSG_KEX_DH_GEX_INIT"); | 314 | debug("expecting SSH2_MSG_KEX_DH_GEX_INIT"); |
315 | packet_read_expect(&plen, SSH2_MSG_KEX_DH_GEX_INIT); | 315 | packet_read_expect(SSH2_MSG_KEX_DH_GEX_INIT); |
316 | 316 | ||
317 | /* key, cert */ | 317 | /* key, cert */ |
318 | if ((dh_client_pub = BN_new()) == NULL) | 318 | if ((dh_client_pub = BN_new()) == NULL) |