comparison 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
comparison
equal deleted inserted replaced
806:71e7d31f7671 807:75509065db53
66 #endif 66 #endif
67 #ifdef DROPBEAR_RSA 67 #ifdef DROPBEAR_RSA
68 dropbear_rsa_key * rsakey; 68 dropbear_rsa_key * rsakey;
69 #endif 69 #endif
70 #ifdef DROPBEAR_ECDSA 70 #ifdef DROPBEAR_ECDSA
71 ecc_key * ecckey; 71 #ifdef DROPBEAR_ECC_256
72 ecc_key * ecckey256;
73 #endif
74 #ifdef DROPBEAR_ECC_384
75 ecc_key * ecckey384;
76 #endif
77 #ifdef DROPBEAR_ECC_521
78 ecc_key * ecckey521;
79 #endif
72 #endif 80 #endif
73 }; 81 };
74 82
75 typedef struct SIGN_key sign_key; 83 typedef struct SIGN_key sign_key;
76 84
90 int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen, 98 int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen,
91 const unsigned char* algoname, unsigned int algolen, 99 const unsigned char* algoname, unsigned int algolen,
92 buffer * line, char ** fingerprint); 100 buffer * line, char ** fingerprint);
93 101
94 #ifdef DROPBEAR_ECDSA 102 #ifdef DROPBEAR_ECDSA
95 #define IS_ECDSA_KEY(type) \ 103 ecc_key ** signkey_ecc_key_ptr(sign_key *key, enum signkey_type ecc_type);
96 ((type) == DROPBEAR_SIGNKEY_ECDSA_NISTP256 \
97 || (type) == DROPBEAR_SIGNKEY_ECDSA_NISTP384 \
98 || (type) == DROPBEAR_SIGNKEY_ECDSA_NISTP521 \
99 || (type) == DROPBEAR_SIGNKEY_ECDSA_KEYGEN)
100 #endif 104 #endif
101 105
102 #endif /* _SIGNKEY_H_ */ 106 #endif /* _SIGNKEY_H_ */