diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kex.c,v 1.23 2001/03/10 17:51:04 markus Exp $"); | 26 | RCSID("$OpenBSD: kex.c,v 1.24 2001/03/28 21:59:40 provos Exp $"); |
27 | 27 | ||
28 | #include <openssl/crypto.h> | 28 | #include <openssl/crypto.h> |
29 | #include <openssl/bio.h> | 29 | #include <openssl/bio.h> |
@@ -290,7 +290,7 @@ kex_hash_gex( | |||
290 | char *ckexinit, int ckexinitlen, | 290 | char *ckexinit, int ckexinitlen, |
291 | char *skexinit, int skexinitlen, | 291 | char *skexinit, int skexinitlen, |
292 | char *serverhostkeyblob, int sbloblen, | 292 | char *serverhostkeyblob, int sbloblen, |
293 | int minbits, BIGNUM *prime, BIGNUM *gen, | 293 | int min, int wantbits, int max, BIGNUM *prime, BIGNUM *gen, |
294 | BIGNUM *client_dh_pub, | 294 | BIGNUM *client_dh_pub, |
295 | BIGNUM *server_dh_pub, | 295 | BIGNUM *server_dh_pub, |
296 | BIGNUM *shared_secret) | 296 | BIGNUM *shared_secret) |
@@ -313,7 +313,13 @@ kex_hash_gex( | |||
313 | buffer_append(&b, skexinit, skexinitlen); | 313 | buffer_append(&b, skexinit, skexinitlen); |
314 | 314 | ||
315 | buffer_put_string(&b, serverhostkeyblob, sbloblen); | 315 | buffer_put_string(&b, serverhostkeyblob, sbloblen); |
316 | buffer_put_int(&b, minbits); | 316 | if (min == -1 || max == -1) |
317 | buffer_put_int(&b, wantbits); | ||
318 | else { | ||
319 | buffer_put_int(&b, min); | ||
320 | buffer_put_int(&b, wantbits); | ||
321 | buffer_put_int(&b, max); | ||
322 | } | ||
317 | buffer_put_bignum2(&b, prime); | 323 | buffer_put_bignum2(&b, prime); |
318 | buffer_put_bignum2(&b, gen); | 324 | buffer_put_bignum2(&b, gen); |
319 | buffer_put_bignum2(&b, client_dh_pub); | 325 | buffer_put_bignum2(&b, client_dh_pub); |