Mercurial > dropbear
diff algo.h @ 1683:41bf8f216644
merge rsa-sha256
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 26 May 2020 00:24:02 +0800 |
parents | 3a97f14c0235 4b4cfc92c5b7 |
children |
line wrap: on
line diff
--- a/algo.h Mon May 25 20:55:13 2020 +0500 +++ b/algo.h Tue May 26 00:24:02 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[]; @@ -120,21 +120,17 @@ const struct ltc_hash_descriptor *hash_desc; }; -int have_algo(const char* algo, size_t algolen, const algo_type algos[]); +/* 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[]); -enum kexguess2_used { - KEXGUESS2_LOOK, - KEXGUESS2_NO, - KEXGUESS2_YES, -}; +#define KEXGUESS2_ALGO_NAME "[email protected]" -#define KEXGUESS2_ALGO_NAME "[email protected]" -#define KEXGUESS2_ALGO_ID 99 - - +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[], - enum kexguess2_used *kexguess2, int *goodguess); + int kexguess2, int *goodguess); #if DROPBEAR_USER_ALGO_LIST int check_user_algos(const char* user_algo_list, algo_type * algos,