X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/3709bfe9981af43e3cd491c37d300b57e5b26d50..1408a8777732536ede3b60bf21c8606af2782339:/sshdh.c?ds=inline diff --git a/sshdh.c b/sshdh.c index 35e66907..f1d709f5 100644 --- a/sshdh.c +++ b/sshdh.c @@ -1,9 +1,13 @@ #include "ssh.h" -struct ssh_kex ssh_diffiehellman = { +const struct ssh_kex ssh_diffiehellman = { "diffie-hellman-group1-sha1" }; +const 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) {