=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/kex.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- src/usr.bin/ssh/kex.c 2000/11/12 19:50:37 1.13 +++ src/usr.bin/ssh/kex.c 2000/12/15 17:30:14 1.14 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.13 2000/11/12 19:50:37 markus Exp $"); +RCSID("$OpenBSD: kex.c,v 1.14 2000/12/15 17:30:14 provos Exp $"); #include "ssh.h" #include "ssh2.h" @@ -139,7 +139,7 @@ return 0; } -DH * +void dh_gen_key(DH *dh) { int tries = 0; @@ -150,7 +150,6 @@ if (tries++ > 10) fatal("dh_new_group1: too many bad keys: giving up"); } while (!dh_pub_is_valid(dh, dh->pub_key)); - return dh; } DH * @@ -168,9 +167,14 @@ if ((ret = BN_hex2bn(&dh->g, gen)) < 0) fatal("BN_hex2bn g"); - return (dh_gen_key(dh)); + return (dh); } +/* + * This just returns the group, we still need to generate the exchange + * value. + */ + DH * dh_new_group(BIGNUM *gen, BIGNUM *modulus) { @@ -182,7 +186,7 @@ dh->p = modulus; dh->g = gen; - return (dh_gen_key(dh)); + return (dh); } DH *