Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
1677:e05c0e394f1d | 1678:4b4cfc92c5b7 |
---|---|
45 | 45 |
46 typedef struct Algo_Type algo_type; | 46 typedef struct Algo_Type algo_type; |
47 | 47 |
48 /* lists mapping ssh types of algorithms to internal values */ | 48 /* lists mapping ssh types of algorithms to internal values */ |
49 extern algo_type sshkex[]; | 49 extern algo_type sshkex[]; |
50 extern algo_type sshhostkey[]; | 50 extern algo_type sigalgs[]; |
51 extern algo_type sshciphers[]; | 51 extern algo_type sshciphers[]; |
52 extern algo_type sshhashes[]; | 52 extern algo_type sshhashes[]; |
53 extern algo_type ssh_compress[]; | 53 extern algo_type ssh_compress[]; |
54 extern algo_type ssh_delaycompress[]; | 54 extern algo_type ssh_delaycompress[]; |
55 extern algo_type ssh_nocompress[]; | 55 extern algo_type ssh_nocompress[]; |
110 | 110 |
111 /* both */ | 111 /* both */ |
112 const struct ltc_hash_descriptor *hash_desc; | 112 const struct ltc_hash_descriptor *hash_desc; |
113 }; | 113 }; |
114 | 114 |
115 /* Includes all algorithms is useall is set */ | |
116 void buf_put_algolist_all(buffer * buf, const algo_type localalgos[], int useall); | |
117 /* Includes "usable" algorithms */ | |
115 void buf_put_algolist(buffer * buf, const algo_type localalgos[]); | 118 void buf_put_algolist(buffer * buf, const algo_type localalgos[]); |
116 | 119 |
117 #define KEXGUESS2_ALGO_NAME "[email protected]" | 120 #define KEXGUESS2_ALGO_NAME "[email protected]" |
118 | 121 |
119 int buf_has_algo(buffer *buf, const char *algo); | 122 int buf_has_algo(buffer *buf, const char *algo); |
123 algo_type * first_usable_algo(algo_type algos[]); | |
120 algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], | 124 algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], |
121 int kexguess2, int *goodguess); | 125 int kexguess2, int *goodguess); |
122 | 126 |
123 #if DROPBEAR_USER_ALGO_LIST | 127 #if DROPBEAR_USER_ALGO_LIST |
124 int check_user_algos(const char* user_algo_list, algo_type * algos, | 128 int check_user_algos(const char* user_algo_list, algo_type * algos, |