summaryrefslogtreecommitdiffhomepage
path: root/signkey.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-05-25 00:54:19 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-05-25 00:54:19 +0800
commitaafeebd0c841494e4f7315890bc97ed0daf99cbd (patch)
tree25eca11af5943d69bc9ce4e27a62b3937bb64824 /signkey.h
parent6b0d47b3645c987b457a6f2562db093827421382 (diff)
have separate ecdsa keys for each size
fix crash from the mp_alloc_init_multi change in RSA --HG-- branch : ecc
Diffstat (limited to 'signkey.h')
-rw-r--r--signkey.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/signkey.h b/signkey.h
index 61095c7..6400d47 100644
--- a/signkey.h
+++ b/signkey.h
@@ -68,7 +68,15 @@ struct SIGN_key {
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 @@ int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen,
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_ */