diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-05-21 23:00:22 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-05-21 23:00:22 +0800 |
commit | 331d4a714f65772e384e15ff55b850a6e9e6786b (patch) | |
tree | 16c000a69313d6f49610d48af4c74d6d07d1d899 /algo.h | |
parent | 2a81289ed32d9e1ca612a41975974bfa258d2ace (diff) |
Make server send SSH_MSG_EXT_INFO
Ensure that only valid hostkey algorithms are sent in the first kex guess
Diffstat (limited to 'algo.h')
-rw-r--r-- | algo.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -47,7 +47,7 @@ typedef struct Algo_Type algo_type; /* 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 @@ struct dropbear_kex { 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 "kexguess2@matt.ucc.asn.au" 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); |