comparison common-algo.c @ 1675:ae41624c2198

split signkey_type and signature_type for RSA sha1 vs sha256
author Matt Johnston <matt@ucc.asn.au>
date Sun, 17 May 2020 23:58:31 +0800
parents ba6fc7afe1c5
children d5cdc60db08e
comparison
equal deleted inserted replaced
1674:ba6fc7afe1c5 1675:ae41624c2198
221 {NULL, 0, NULL, 0, NULL} 221 {NULL, 0, NULL, 0, NULL}
222 }; 222 };
223 223
224 algo_type sshhostkey[] = { 224 algo_type sshhostkey[] = {
225 #if DROPBEAR_ED25519 225 #if DROPBEAR_ED25519
226 {"ssh-ed25519", DROPBEAR_SIGNKEY_ED25519, NULL, 1, NULL}, 226 {"ssh-ed25519", DROPBEAR_SIGNATURE_ED25519, NULL, 1, NULL},
227 #endif 227 #endif
228 #if DROPBEAR_ECDSA 228 #if DROPBEAR_ECDSA
229 #if DROPBEAR_ECC_256 229 #if DROPBEAR_ECC_256
230 {"ecdsa-sha2-nistp256", DROPBEAR_SIGNKEY_ECDSA_NISTP256, NULL, 1, NULL}, 230 {"ecdsa-sha2-nistp256", DROPBEAR_SIGNATURE_ECDSA_NISTP256, NULL, 1, NULL},
231 #endif 231 #endif
232 #if DROPBEAR_ECC_384 232 #if DROPBEAR_ECC_384
233 {"ecdsa-sha2-nistp384", DROPBEAR_SIGNKEY_ECDSA_NISTP384, NULL, 1, NULL}, 233 {"ecdsa-sha2-nistp384", DROPBEAR_SIGNATURE_ECDSA_NISTP384, NULL, 1, NULL},
234 #endif 234 #endif
235 #if DROPBEAR_ECC_521 235 #if DROPBEAR_ECC_521
236 {"ecdsa-sha2-nistp521", DROPBEAR_SIGNKEY_ECDSA_NISTP521, NULL, 1, NULL}, 236 {"ecdsa-sha2-nistp521", DROPBEAR_SIGNATURE_ECDSA_NISTP521, NULL, 1, NULL},
237 #endif 237 #endif
238 #endif 238 #endif
239 #if DROPBEAR_RSA 239 #if DROPBEAR_RSA
240 #if DROPBEAR_RSA_SHA256 240 #if DROPBEAR_RSA_SHA256
241 {"rsa-sha2-256", DROPBEAR_SIGNKEY_RSA_SHA256, NULL, 1, NULL}, 241 {"rsa-sha2-256", DROPBEAR_SIGNATURE_RSA_SHA256, NULL, 1, NULL},
242 #endif 242 #endif
243 #if DROPBEAR_RSA_SHA1 243 #if DROPBEAR_RSA_SHA1
244 {"ssh-rsa", DROPBEAR_SIGNKEY_RSA, NULL, 1, NULL}, 244 {"ssh-rsa", DROPBEAR_SIGNATURE_RSA_SHA1, NULL, 1, NULL},
245 #endif 245 #endif
246 #endif 246 #endif
247 #if DROPBEAR_DSS 247 #if DROPBEAR_DSS
248 {"ssh-dss", DROPBEAR_SIGNKEY_DSS, NULL, 1, NULL}, 248 {"ssh-dss", DROPBEAR_SIGNATURE_DSS, NULL, 1, NULL},
249 #endif 249 #endif
250 {NULL, 0, NULL, 0, NULL} 250 {NULL, 0, NULL, 0, NULL}
251 }; 251 };
252 252
253 #if DROPBEAR_DH_GROUP1 253 #if DROPBEAR_DH_GROUP1
261 #endif 261 #endif
262 #if DROPBEAR_DH_GROUP16 262 #if DROPBEAR_DH_GROUP16
263 static const struct dropbear_kex kex_dh_group16_sha512 = {DROPBEAR_KEX_NORMAL_DH, dh_p_16, DH_P_16_LEN, NULL, &sha512_desc }; 263 static const struct dropbear_kex kex_dh_group16_sha512 = {DROPBEAR_KEX_NORMAL_DH, dh_p_16, DH_P_16_LEN, NULL, &sha512_desc };
264 #endif 264 #endif
265 265
266 /* These can't be const since dropbear_ecc_fill_dp() fills out
267 ecc_curve at runtime */
268 #if DROPBEAR_ECDH 266 #if DROPBEAR_ECDH
269 #if DROPBEAR_ECC_256 267 #if DROPBEAR_ECC_256
270 static const struct dropbear_kex kex_ecdh_nistp256 = {DROPBEAR_KEX_ECDH, NULL, 0, &ecc_curve_nistp256, &sha256_desc }; 268 static const struct dropbear_kex kex_ecdh_nistp256 = {DROPBEAR_KEX_ECDH, NULL, 0, &ecc_curve_nistp256, &sha256_desc };
271 #endif 269 #endif
272 #if DROPBEAR_ECC_384 270 #if DROPBEAR_ECC_384