diff options
Diffstat (limited to 'svr-session.c')
-rw-r--r-- | svr-session.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/svr-session.c b/svr-session.c index 3ff7953..ae9cb24 100644 --- a/svr-session.c +++ b/svr-session.c @@ -42,6 +42,7 @@ #include "crypto_desc.h" static void svr_remoteclosed(void); +static void svr_algos_initialise(void); struct serversession svr_ses; /* GLOBAL */ @@ -102,6 +103,7 @@ void svr_session(int sock, int childpipe) { svr_authinitialise(); chaninitialise(svr_chantypes); svr_chansessinitialise(); + svr_algos_initialise(); /* for logging the remote address */ get_socket_address(ses.sock_in, NULL, NULL, &host, &port, 0); @@ -243,3 +245,14 @@ static void svr_remoteclosed() { } +static void svr_algos_initialise(void) { +#if DROPBEAR_DH_GROUP1 && DROPBEAR_DH_GROUP1_CLIENTONLY + algo_type *algo; + for (algo = sshkex; algo->name; algo++) { + if (strcmp(algo->name, "diffie-hellman-group1-sha1") == 0) { + algo->usable = 0; + } + } +#endif +} + |