Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
1673:e0871128e61f | 1683:41bf8f216644 |
---|---|
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[]; |
118 | 118 |
119 /* both */ | 119 /* both */ |
120 const struct ltc_hash_descriptor *hash_desc; | 120 const struct ltc_hash_descriptor *hash_desc; |
121 }; | 121 }; |
122 | 122 |
123 int have_algo(const char* algo, size_t algolen, const algo_type algos[]); | 123 /* Includes all algorithms is useall is set */ |
124 void buf_put_algolist_all(buffer * buf, const algo_type localalgos[], int useall); | |
125 /* Includes "usable" algorithms */ | |
124 void buf_put_algolist(buffer * buf, const algo_type localalgos[]); | 126 void buf_put_algolist(buffer * buf, const algo_type localalgos[]); |
125 | 127 |
126 enum kexguess2_used { | 128 #define KEXGUESS2_ALGO_NAME "[email protected]" |
127 KEXGUESS2_LOOK, | |
128 KEXGUESS2_NO, | |
129 KEXGUESS2_YES, | |
130 }; | |
131 | 129 |
132 #define KEXGUESS2_ALGO_NAME "[email protected]" | 130 int buf_has_algo(buffer *buf, const char *algo); |
133 #define KEXGUESS2_ALGO_ID 99 | 131 algo_type * first_usable_algo(algo_type algos[]); |
134 | |
135 | |
136 algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], | 132 algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], |
137 enum kexguess2_used *kexguess2, int *goodguess); | 133 int kexguess2, int *goodguess); |
138 | 134 |
139 #if DROPBEAR_USER_ALGO_LIST | 135 #if DROPBEAR_USER_ALGO_LIST |
140 int check_user_algos(const char* user_algo_list, algo_type * algos, | 136 int check_user_algos(const char* user_algo_list, algo_type * algos, |
141 const char *algo_desc); | 137 const char *algo_desc); |
142 char * algolist_string(const algo_type algos[]); | 138 char * algolist_string(const algo_type algos[]); |