1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 12:02:47 -05:00

Restructure things so that a single entry in the KEX preference list can

correspond to multiple SSH-2 KEX algorithms.  We already do the equivalent
for cipher algorithms.

[originally from svn r6262]
This commit is contained in:
Ben Harris
2005-09-03 13:41:43 +00:00
parent d628d14e7f
commit a42d103cf9
3 changed files with 56 additions and 18 deletions

33
sshdh.c
View File

@ -46,21 +46,48 @@ static const unsigned char P14[] = {
*/
static const unsigned char G[] = { 2 };
const struct ssh_kex ssh_diffiehellman_group1 = {
static const struct ssh_kex ssh_diffiehellman_group1_sha1 = {
"diffie-hellman-group1-sha1", "group1",
P1, G, lenof(P1), lenof(G), &ssh_sha1
};
const struct ssh_kex ssh_diffiehellman_group14 = {
static const struct ssh_kex *const group1_list[] = {
&ssh_diffiehellman_group1_sha1
};
const struct ssh_kexes ssh_diffiehellman_group1 = {
sizeof(group1_list) / sizeof(*group1_list),
group1_list
};
static const struct ssh_kex ssh_diffiehellman_group14_sha1 = {
"diffie-hellman-group14-sha1", "group14",
P14, G, lenof(P14), lenof(G), &ssh_sha1
};
const struct ssh_kex ssh_diffiehellman_gex = {
static const struct ssh_kex *const group14_list[] = {
&ssh_diffiehellman_group14_sha1
};
const struct ssh_kexes ssh_diffiehellman_group14 = {
sizeof(group14_list) / sizeof(*group14_list),
group14_list
};
static const struct ssh_kex ssh_diffiehellman_gex_sha1 = {
"diffie-hellman-group-exchange-sha1", NULL,
NULL, NULL, 0, 0, &ssh_sha1
};
static const struct ssh_kex *const gex_list[] = {
&ssh_diffiehellman_gex_sha1
};
const struct ssh_kexes ssh_diffiehellman_gex = {
sizeof(gex_list) / sizeof(*gex_list),
gex_list
};
/*
* Variables.
*/