Mercurial > dropbear
diff svr-session.c @ 1546:bb8eaa26bc93 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 26 Feb 2018 22:44:48 +0800 |
parents | 5916af64acd4 d1a8a05216ff |
children | 2f64cb3d3007 |
line wrap: on
line diff
--- a/svr-session.c Wed Feb 21 21:59:52 2018 +0800 +++ b/svr-session.c Mon Feb 26 22:44:48 2018 +0800 @@ -43,6 +43,7 @@ #include "fuzz.h" static void svr_remoteclosed(void); +static void svr_algos_initialise(void); struct serversession svr_ses; /* GLOBAL */ @@ -103,6 +104,7 @@ 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); @@ -254,3 +256,14 @@ } +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 +} +