diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:29:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:29:51 +0800 |
commit | 7e8094d53a1c01ac671156ff2e67157b64d01a3a (patch) | |
tree | c88345f5bdd118eb9414dff5ab5c307bb1806c57 /common-algo.c | |
parent | f7a664f127d3dfde0e7c7a9ca74b1d14f9a2f983 (diff) | |
parent | f042eb41ab0d31f8ba0c5ccc9c848ad01f08f986 (diff) |
merge from main
--HG--
branch : fuzz
Diffstat (limited to 'common-algo.c')
-rw-r--r-- | common-algo.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/common-algo.c b/common-algo.c index f783816..e61fcaa 100644 --- a/common-algo.c +++ b/common-algo.c @@ -179,9 +179,6 @@ algo_type sshciphers[] = { {"blowfish-cbc", 0, &dropbear_blowfish, 1, &dropbear_mode_cbc}, #endif #endif /* DROPBEAR_ENABLE_CBC_MODE */ -#if DROPBEAR_NONE_CIPHER - {"none", 0, (void*)&dropbear_nocipher, 1, &dropbear_mode_none}, -#endif {NULL, 0, NULL, 0, NULL} }; @@ -314,7 +311,7 @@ algo_type sshkex[] = { * against. * Returns DROPBEAR_SUCCESS if we have a match for algo, DROPBEAR_FAILURE * otherwise */ -int have_algo(char* algo, size_t algolen, algo_type algos[]) { +int have_algo(const char* algo, size_t algolen, const algo_type algos[]) { int i; @@ -329,7 +326,7 @@ int have_algo(char* algo, size_t algolen, algo_type algos[]) { } /* Output a comma separated list of algorithms to a buffer */ -void buf_put_algolist(buffer * buf, algo_type localalgos[]) { +void buf_put_algolist(buffer * buf, const algo_type localalgos[]) { unsigned int i, len; unsigned int donefirst = 0; @@ -466,42 +463,10 @@ out: return ret; } -#if DROPBEAR_NONE_CIPHER - -void -set_algo_usable(algo_type algos[], const char * algo_name, int usable) -{ - algo_type *a; - for (a = algos; a->name != NULL; a++) - { - if (strcmp(a->name, algo_name) == 0) - { - a->usable = usable; - return; - } - } -} - -int -get_algo_usable(algo_type algos[], const char * algo_name) -{ - algo_type *a; - for (a = algos; a->name != NULL; a++) - { - if (strcmp(a->name, algo_name) == 0) - { - return a->usable; - } - } - return 0; -} - -#endif /* DROPBEAR_NONE_CIPHER */ - #if DROPBEAR_USER_ALGO_LIST char * -algolist_string(algo_type algos[]) +algolist_string(const algo_type algos[]) { char *ret_list; buffer *b = buf_new(200); |