diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 23:32:25 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 23:32:25 +0800 |
commit | a94338dc6725f9f2594c6c5e1c9a799c7e11f3f1 (patch) | |
tree | 967f689c4c8fa73219cf42e1f4af1f2713b08064 /dropbearkey.c | |
parent | 364fb6019c1931de3d181f21ea491ec112161577 (diff) |
add configuration option for default RSA size.
print key size with dropbearkey
Diffstat (limited to 'dropbearkey.c')
-rw-r--r-- | dropbearkey.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dropbearkey.c b/dropbearkey.c index 5cb12ef..316d27e 100644 --- a/dropbearkey.c +++ b/dropbearkey.c @@ -139,7 +139,7 @@ int main(int argc, char ** argv) { enum signkey_type keytype = DROPBEAR_SIGNKEY_NONE; char * typetext = NULL; char * sizetext = NULL; - unsigned int bits = 0; + unsigned int bits = 0, genbits; int printpub = 0; crypto_init(); @@ -240,7 +240,8 @@ int main(int argc, char ** argv) { check_signkey_bits(keytype, bits);; } - fprintf(stderr, "Generating key, this may take a while...\n"); + genbits = signkey_generate_get_bits(keytype, bits); + fprintf(stderr, "Generating %d bit %s key, this may take a while...\n", genbits, typetext); if (signkey_generate(keytype, bits, filename, 0) == DROPBEAR_FAILURE) { dropbear_exit("Failed to generate key.\n"); |