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.13 2001/12/28 12:14:27 markus Exp $"); | 27 | RCSID("$OpenBSD: kexgex.c,v 1.14 2001/12/28 13:57:33 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 dlen, plen, min, max, nbits; | 110 | int plen, 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); |
@@ -142,10 +142,10 @@ kexgex_client(Kex *kex) | |||
142 | 142 | ||
143 | if ((p = BN_new()) == NULL) | 143 | if ((p = BN_new()) == NULL) |
144 | fatal("BN_new"); | 144 | fatal("BN_new"); |
145 | packet_get_bignum2(p, &dlen); | 145 | packet_get_bignum2(p); |
146 | if ((g = BN_new()) == NULL) | 146 | if ((g = BN_new()) == NULL) |
147 | fatal("BN_new"); | 147 | fatal("BN_new"); |
148 | packet_get_bignum2(g, &dlen); | 148 | packet_get_bignum2(g); |
149 | packet_check_eom(); | 149 | packet_check_eom(); |
150 | 150 | ||
151 | if (BN_num_bits(p) < min || BN_num_bits(p) > max) | 151 | if (BN_num_bits(p) < min || BN_num_bits(p) > max) |
@@ -185,7 +185,7 @@ kexgex_client(Kex *kex) | |||
185 | /* DH paramter f, server public DH key */ | 185 | /* DH paramter f, server public DH key */ |
186 | if ((dh_server_pub = BN_new()) == NULL) | 186 | if ((dh_server_pub = BN_new()) == NULL) |
187 | fatal("dh_server_pub == NULL"); | 187 | fatal("dh_server_pub == NULL"); |
188 | packet_get_bignum2(dh_server_pub, &dlen); | 188 | packet_get_bignum2(dh_server_pub); |
189 | 189 | ||
190 | #ifdef DEBUG_KEXDH | 190 | #ifdef DEBUG_KEXDH |
191 | fprintf(stderr, "dh_server_pub= "); | 191 | fprintf(stderr, "dh_server_pub= "); |
@@ -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, dlen, slen; | 264 | int min = -1, max = -1, nbits = -1, type, plen, 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"); |
@@ -317,7 +317,7 @@ kexgex_server(Kex *kex) | |||
317 | /* key, cert */ | 317 | /* key, cert */ |
318 | if ((dh_client_pub = BN_new()) == NULL) | 318 | if ((dh_client_pub = BN_new()) == NULL) |
319 | fatal("dh_client_pub == NULL"); | 319 | fatal("dh_client_pub == NULL"); |
320 | packet_get_bignum2(dh_client_pub, &dlen); | 320 | packet_get_bignum2(dh_client_pub); |
321 | 321 | ||
322 | #ifdef DEBUG_KEXDH | 322 | #ifdef DEBUG_KEXDH |
323 | fprintf(stderr, "dh_client_pub= "); | 323 | fprintf(stderr, "dh_client_pub= "); |