Mercurial > dropbear
diff dropbearkey.c @ 1256:506f7681d0f8 coverity
merge up to date
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2016 22:45:43 +0800 |
parents | 2bb4c662d1c2 |
children | 750ec4ec4cbe efad433418c4 |
line wrap: on
line diff
--- a/dropbearkey.c Tue Dec 15 22:24:34 2015 +0800 +++ b/dropbearkey.c Tue Mar 15 22:45:43 2016 +0800 @@ -105,25 +105,25 @@ /* fails fatally */ static void check_signkey_bits(enum signkey_type type, int bits) { - switch (type) { + switch (type) { #ifdef DROPBEAR_RSA - case DROPBEAR_SIGNKEY_RSA: - if (bits < 512 || bits > 4096 || (bits % 8 != 0)) { - dropbear_exit("Bits must satisfy 512 <= bits <= 4096, and be a" - " multiple of 8\n"); - } - break; + case DROPBEAR_SIGNKEY_RSA: + if (bits < 512 || bits > 4096 || (bits % 8 != 0)) { + dropbear_exit("Bits must satisfy 512 <= bits <= 4096, and be a" + " multiple of 8\n"); + } + break; #endif #ifdef DROPEAR_DSS - case DROPBEAR_SIGNKEY_DSS: - if (bits != 1024) { - dropbear_exit("DSS keys have a fixed size of 1024 bits\n"); - exit(EXIT_FAILURE); - } + case DROPBEAR_SIGNKEY_DSS: + if (bits != 1024) { + dropbear_exit("DSS keys have a fixed size of 1024 bits\n"); + exit(EXIT_FAILURE); + } #endif - default: - (void)0; /* quiet, compiler. ecdsa handles checks itself */ - } + default: + (void)0; /* quiet, compiler. ecdsa handles checks itself */ + } } #if defined(DBMULTI_dropbearkey) || !defined(DROPBEAR_MULTI) @@ -238,13 +238,13 @@ } check_signkey_bits(keytype, bits);; - } + } fprintf(stderr, "Generating key, this may take a while...\n"); - if (signkey_generate(keytype, bits, filename) == DROPBEAR_FAILURE) - { - dropbear_exit("Failed to generate key.\n"); - } + if (signkey_generate(keytype, bits, filename) == DROPBEAR_FAILURE) + { + dropbear_exit("Failed to generate key.\n"); + } printpubfile(filename);