summaryrefslogtreecommitdiff
path: root/ecdsa.c
diff options
context:
space:
mode:
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) {