summaryrefslogtreecommitdiffhomepage
path: root/keyimport.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-11-07 23:49:37 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-11-07 23:49:37 +0800
commit58fe1c2d2a48cd51e1bafeee8e1e20f7201f31df (patch)
treee82591920439b124a0947b7d6dbb351bfbe8c053 /keyimport.c
parent4363b8b32deb69b30b756a34a720e67d1c3708fe (diff)
Add '-R' for delayed hostkey option
--HG-- branch : keyondemand
Diffstat (limited to 'keyimport.c')
-rw-r--r--keyimport.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/keyimport.c b/keyimport.c
index 7595c1d..7098ae7 100644
--- a/keyimport.c
+++ b/keyimport.c
@@ -709,19 +709,29 @@ static sign_key *openssh_read(const char *filename, char * UNUSED(passphrase))
goto error;
}
- if (len == sizeof(OID_SEC256R1_BLOB)
+ if (0) {}
+#ifdef DROPBEAR_ECC_256
+ else if (len == sizeof(OID_SEC256R1_BLOB)
&& memcmp(p, OID_SEC256R1_BLOB, len) == 0) {
retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP256;
curve = &ecc_curve_nistp256;
- } else if (len == sizeof(OID_SEC384R1_BLOB)
+ }
+#endif
+#ifdef DROPBEAR_ECC_384
+ else if (len == sizeof(OID_SEC384R1_BLOB)
&& memcmp(p, OID_SEC384R1_BLOB, len) == 0) {
retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP384;
curve = &ecc_curve_nistp384;
- } else if (len == sizeof(OID_SEC521R1_BLOB)
+ }
+#endif
+#ifdef DROPBEAR_ECC_521
+ else if (len == sizeof(OID_SEC521R1_BLOB)
&& memcmp(p, OID_SEC521R1_BLOB, len) == 0) {
retkey->type = DROPBEAR_SIGNKEY_ECDSA_NISTP521;
curve = &ecc_curve_nistp521;
- } else {
+ }
+#endif
+ else {
errmsg = "Unknown ECC key type";
goto error;
}