diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-05-03 23:07:48 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-05-03 23:07:48 +0800 |
commit | 95a21c8fd796c570e8660db983b3032af96ec5cb (patch) | |
tree | 05347fa8c369407065cccb05806a06593f8a6bc4 /dropbearkey.c | |
parent | 79660f2eb1c64bcac9ba0084f9d3822ee88dbd5c (diff) |
ecdsa is working
--HG--
branch : ecc
Diffstat (limited to 'dropbearkey.c')
-rw-r--r-- | dropbearkey.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dropbearkey.c b/dropbearkey.c index fb8461e..8bc114c 100644 --- a/dropbearkey.c +++ b/dropbearkey.c @@ -53,6 +53,7 @@ #include "gendss.h" #include "ecdsa.h" #include "crypto_desc.h" +#include "random.h" static void printhelp(char * progname); @@ -120,6 +121,9 @@ int main(int argc, char ** argv) { unsigned int bits; int printpub = 0; + crypto_init(); + seedrandom(); + /* get the commandline options */ for (i = 1; i < argc; i++) { if (argv[i] == NULL) { @@ -223,10 +227,6 @@ int main(int argc, char ** argv) { /* don't want the file readable by others */ umask(077); - crypto_init(); - seedrandom(); - - /* now we can generate the key */ key = new_sign_key(); @@ -245,6 +245,7 @@ int main(int argc, char ** argv) { #ifdef DROPBEAR_ECDSA case DROPBEAR_SIGNKEY_ECDSA_KEYGEN: key->ecckey = gen_ecdsa_priv_key(bits); + keytype = ecdsa_signkey_type(key->ecckey); break; #endif default: |