diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 8b523232f..0baecf0a5 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.49 2001/02/28 09:57:07 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.50 2001/03/05 17:17:21 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/md5.h> | 29 | #include <openssl/md5.h> |
@@ -171,7 +171,7 @@ ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr, | |||
171 | debug("Sending SSH2_MSG_KEXDH_INIT."); | 171 | debug("Sending SSH2_MSG_KEXDH_INIT."); |
172 | /* generate and send 'e', client DH public key */ | 172 | /* generate and send 'e', client DH public key */ |
173 | dh = dh_new_group1(); | 173 | dh = dh_new_group1(); |
174 | dh_gen_key(dh); | 174 | dh_gen_key(dh, kex->we_need * 8); |
175 | packet_start(SSH2_MSG_KEXDH_INIT); | 175 | packet_start(SSH2_MSG_KEXDH_INIT); |
176 | packet_put_bignum2(dh->pub_key); | 176 | packet_put_bignum2(dh->pub_key); |
177 | packet_send(); | 177 | packet_send(); |
@@ -316,7 +316,7 @@ ssh_dhgex_client(Kex *kex, char *host, struct sockaddr *hostaddr, | |||
316 | u_char *kbuf; | 316 | u_char *kbuf; |
317 | u_char *hash; | 317 | u_char *hash; |
318 | 318 | ||
319 | nbits = dh_estimate(kex->enc[MODE_OUT].cipher->key_len * 8); | 319 | nbits = dh_estimate(kex->we_need * 8); |
320 | 320 | ||
321 | debug("Sending SSH2_MSG_KEX_DH_GEX_REQUEST."); | 321 | debug("Sending SSH2_MSG_KEX_DH_GEX_REQUEST."); |
322 | packet_start(SSH2_MSG_KEX_DH_GEX_REQUEST); | 322 | packet_start(SSH2_MSG_KEX_DH_GEX_REQUEST); |
@@ -342,7 +342,7 @@ ssh_dhgex_client(Kex *kex, char *host, struct sockaddr *hostaddr, | |||
342 | packet_get_bignum2(g, &dlen); | 342 | packet_get_bignum2(g, &dlen); |
343 | dh = dh_new_group(g, p); | 343 | dh = dh_new_group(g, p); |
344 | 344 | ||
345 | dh_gen_key(dh); | 345 | dh_gen_key(dh, kex->we_need * 8); |
346 | 346 | ||
347 | #ifdef DEBUG_KEXDH | 347 | #ifdef DEBUG_KEXDH |
348 | fprintf(stderr, "\np= "); | 348 | fprintf(stderr, "\np= "); |