Mercurial > dropbear
diff algo.h @ 1678:4b4cfc92c5b7
Make server send SSH_MSG_EXT_INFO
Ensure that only valid hostkey algorithms are sent in the first kex guess
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 21 May 2020 23:00:22 +0800 |
parents | d5cdc60db08e |
children | 41bf8f216644 |
line wrap: on
line diff
--- a/algo.h Thu May 21 22:58:56 2020 +0800 +++ b/algo.h Thu May 21 23:00:22 2020 +0800 @@ -47,7 +47,7 @@ /* lists mapping ssh types of algorithms to internal values */ extern algo_type sshkex[]; -extern algo_type sshhostkey[]; +extern algo_type sigalgs[]; extern algo_type sshciphers[]; extern algo_type sshhashes[]; extern algo_type ssh_compress[]; @@ -112,11 +112,15 @@ const struct ltc_hash_descriptor *hash_desc; }; +/* Includes all algorithms is useall is set */ +void buf_put_algolist_all(buffer * buf, const algo_type localalgos[], int useall); +/* Includes "usable" algorithms */ void buf_put_algolist(buffer * buf, const algo_type localalgos[]); #define KEXGUESS2_ALGO_NAME "[email protected]" int buf_has_algo(buffer *buf, const char *algo); +algo_type * first_usable_algo(algo_type algos[]); algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], int kexguess2, int *goodguess);