Commit 00f29f11 authored by Niels Möller's avatar Niels Möller
Browse files

* src/lsh.c (main_argp_parser): Support "diffie-hellman-group2-sha1".

* src/lshd.c (main_argp_parser): Likewise.

Rev: src/lsh.c:1.199
Rev: src/lshd.c:1.166
parent 460a9f2b
......@@ -768,7 +768,7 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
{
int i = 0;
self->kex_algorithms
= alloc_int_list(2 * self->with_dh_keyexchange + self->with_srp_keyexchange);
= alloc_int_list(3 * self->with_dh_keyexchange + self->with_srp_keyexchange);
#if WITH_SRP
if (self->with_srp_keyexchange)
......@@ -784,11 +784,19 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
#endif /* WITH_SRP */
if (self->with_dh_keyexchange)
{
struct keyexchange_algorithm *dh2
= make_dh_client(make_dh14(self->super.random));
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP14_SHA1;
ALIST_SET(self->algorithms->algorithms,
ATOM_DIFFIE_HELLMAN_GROUP14_SHA1,
&make_dh_client(make_dh14(self->super.random))
->super);
&dh2->super);
/* Alternative name for the same thing */
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP2_SHA1;
ALIST_SET(self->algorithms->algorithms,
ATOM_DIFFIE_HELLMAN_GROUP2_SHA1,
&dh2->super);
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP1_SHA1;
ALIST_SET(self->algorithms->algorithms,
......
......@@ -561,15 +561,23 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
{
int i = 0;
self->kex_algorithms
= alloc_int_list(2 * self->with_dh_keyexchange + self->with_srp_keyexchange);
= alloc_int_list(3 * self->with_dh_keyexchange + self->with_srp_keyexchange);
if (self->with_dh_keyexchange)
{
struct keyexchange_algorithm *dh2
= make_dh_server(make_dh14(self->random));
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP14_SHA1;
ALIST_SET(self->super.algorithms,
ATOM_DIFFIE_HELLMAN_GROUP14_SHA1,
&make_dh_server(make_dh14(self->random))
->super);
&dh2->super);
/* Alternative name for the same thing */
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP2_SHA1;
ALIST_SET(self->super.algorithms,
ATOM_DIFFIE_HELLMAN_GROUP2_SHA1,
&dh2->super);
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP1_SHA1;
ALIST_SET(self->super.algorithms,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment