Mercurial > dropbear
diff signkey.h @ 807:75509065db53 ecc
have separate ecdsa keys for each size
fix crash from the mp_alloc_init_multi change in RSA
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 25 May 2013 00:54:19 +0800 |
parents | 7f604f9b3756 |
children | d4ce5269a439 |
line wrap: on
line diff
--- a/signkey.h Thu May 23 22:18:33 2013 +0800 +++ b/signkey.h Sat May 25 00:54:19 2013 +0800 @@ -68,7 +68,15 @@ dropbear_rsa_key * rsakey; #endif #ifdef DROPBEAR_ECDSA - ecc_key * ecckey; +#ifdef DROPBEAR_ECC_256 + ecc_key * ecckey256; +#endif +#ifdef DROPBEAR_ECC_384 + ecc_key * ecckey384; +#endif +#ifdef DROPBEAR_ECC_521 + ecc_key * ecckey521; +#endif #endif }; @@ -92,11 +100,7 @@ buffer * line, char ** fingerprint); #ifdef DROPBEAR_ECDSA -#define IS_ECDSA_KEY(type) \ - ((type) == DROPBEAR_SIGNKEY_ECDSA_NISTP256 \ - || (type) == DROPBEAR_SIGNKEY_ECDSA_NISTP384 \ - || (type) == DROPBEAR_SIGNKEY_ECDSA_NISTP521 \ - || (type) == DROPBEAR_SIGNKEY_ECDSA_KEYGEN) +ecc_key ** signkey_ecc_key_ptr(sign_key *key, enum signkey_type ecc_type); #endif #endif /* _SIGNKEY_H_ */