diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-10-20 21:06:18 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-10-20 21:06:18 +0800 |
commit | 7fda6418e15a92fd538a5e72682de94f90b6e060 (patch) | |
tree | 96bb4f07062b1282cee6c368e5b9e0873110ade1 /dropbearconvert.c | |
parent | aafeebd0c841494e4f7315890bc97ed0daf99cbd (diff) |
writing out openssh ecc keys works
--HG--
branch : ecc
Diffstat (limited to 'dropbearconvert.c')
-rw-r--r-- | dropbearconvert.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/dropbearconvert.c b/dropbearconvert.c index 01fe373..958ced6 100644 --- a/dropbearconvert.c +++ b/dropbearconvert.c @@ -28,6 +28,8 @@ #include "buffer.h" #include "dbutil.h" #include "keyimport.h" +#include "crypto_desc.h" +#include "random.h" static int do_convert(int intype, const char* infile, int outtype, @@ -114,7 +116,7 @@ static int do_convert(int intype, const char* infile, int outtype, const char* outfile) { sign_key * key = NULL; - char * keytype = NULL; + const char * keytype = NULL; int ret = 1; key = import_read(infile, NULL, intype); @@ -124,16 +126,7 @@ static int do_convert(int intype, const char* infile, int outtype, goto out; } -#ifdef DROPBEAR_RSA - if (key->rsakey != NULL) { - keytype = "RSA"; - } -#endif -#ifdef DROPBEAR_DSS - if (key->dsskey != NULL) { - keytype = "DSS"; - } -#endif + keytype = signkey_name_from_type(key->type, NULL); fprintf(stderr, "Key is a %s key\n", keytype); |