summaryrefslogtreecommitdiffhomepage
path: root/ecdsa.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-11-07 00:18:52 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-11-07 00:18:52 +0800
commit4363b8b32deb69b30b756a34a720e67d1c3708fe (patch)
tree937e39973fac54852e28816847fc97729a588dcf /ecdsa.c
parentcfac8435a73cddbc54a70ab07418b0bdb900fc10 (diff)
refactor key generation, make it generate as required.
Needs UI in server command line options --HG-- branch : keyondemand
Diffstat (limited to 'ecdsa.c')
-rw-r--r--ecdsa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ecdsa.c b/ecdsa.c
index 66612e4..fc8ea1f 100644
--- a/ecdsa.c
+++ b/ecdsa.c
@@ -8,6 +8,13 @@
#ifdef DROPBEAR_ECDSA
+int signkey_is_ecdsa(enum signkey_type type)
+{
+ return type == DROPBEAR_SIGNKEY_ECDSA_NISTP256
+ || type == DROPBEAR_SIGNKEY_ECDSA_NISTP384
+ || type == DROPBEAR_SIGNKEY_ECDSA_NISTP521;
+}
+
enum signkey_type ecdsa_signkey_type(ecc_key * key) {
#ifdef DROPBEAR_ECC_256
if (key->dp == ecc_curve_nistp256.dp) {