Commit 68de3b91 authored by Niels Möller's avatar Niels Möller
Browse files

* src/lsh.c (main_argp_parser): Added support for

diffie-hellman-group14-sha1.
* src/lshd.c (main_argp_parser): Likewise.

Rev: src/lsh.c:1.196
Rev: src/lshd.c:1.164
parent bb6095d6
......@@ -764,7 +764,7 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
{
int i = 0;
self->kex_algorithms
= alloc_int_list(self->with_dh_keyexchange + self->with_srp_keyexchange);
= alloc_int_list(2 * self->with_dh_keyexchange + self->with_srp_keyexchange);
#if WITH_SRP
if (self->with_srp_keyexchange)
......@@ -780,6 +780,12 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
#endif /* WITH_SRP */
if (self->with_dh_keyexchange)
{
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);
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP1_SHA1;
ALIST_SET(self->algorithms->algorithms,
ATOM_DIFFIE_HELLMAN_GROUP1_SHA1,
......
......@@ -561,10 +561,16 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
{
int i = 0;
self->kex_algorithms
= alloc_int_list(self->with_dh_keyexchange + self->with_srp_keyexchange);
= alloc_int_list(2 * self->with_dh_keyexchange + self->with_srp_keyexchange);
if (self->with_dh_keyexchange)
{
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);
LIST(self->kex_algorithms)[i++] = ATOM_DIFFIE_HELLMAN_GROUP1_SHA1;
ALIST_SET(self->super.algorithms,
ATOM_DIFFIE_HELLMAN_GROUP1_SHA1,
......
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