X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/d2a0e0be6953a1ae78e400669090dc2bde01c58e..a92dd380e9adcd09e9c43fa44466b5fb2e323c3b:/sshdh.c diff --git a/sshdh.c b/sshdh.c index 35e66907..18749ecc 100644 --- a/sshdh.c +++ b/sshdh.c @@ -4,6 +4,10 @@ struct ssh_kex ssh_diffiehellman = { "diffie-hellman-group1-sha1" }; +struct ssh_kex ssh_diffiehellman_gex = { + "diffie-hellman-group-exchange-sha1" +}; + /* * The prime p used in the key exchange. */ @@ -50,6 +54,15 @@ void dh_setup_group1(void) { } /* + * Initialise DH for an alternative group. + */ +void dh_setup_group(Bignum pval, Bignum gval) { + p = copybn(pval); + g = copybn(gval); + dh_init(); +} + +/* * Clean up. */ void dh_cleanup(void) {