diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-11-29 13:10:24 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-11-29 13:10:24 +1100 |
commit | 3af2ac56a28dd49226388505b5ebbfc778335f9c (patch) | |
tree | ce32ed5fce4190ac16491831967a62c509295c9c /ssh-keygen.c | |
parent | 660c3405f95fa3f1169cbeaba2bc74a37bcbea9e (diff) |
- dtucker@cvs.openbsd.org 2005/11/29 02:04:55
[ssh-keygen.c]
Populate default key sizes before checking them; from & ok tim@
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 3a6174ac1..64fadc7a1 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.134 2005/11/28 05:16:53 dtucker Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.135 2005/11/29 02:04:55 dtucker Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -1259,12 +1259,12 @@ main(int ac, char **av) | |||
1259 | fprintf(stderr, "unknown key type %s\n", key_type_name); | 1259 | fprintf(stderr, "unknown key type %s\n", key_type_name); |
1260 | exit(1); | 1260 | exit(1); |
1261 | } | 1261 | } |
1262 | if (!quiet) | ||
1263 | printf("Generating public/private %s key pair.\n", key_type_name); | ||
1264 | if (bits == 0) | 1262 | if (bits == 0) |
1265 | bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS; | 1263 | bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS; |
1266 | if (type == KEY_DSA && bits != 1024) | 1264 | if (type == KEY_DSA && bits != 1024) |
1267 | fatal("DSA keys must be 1024 bits"); | 1265 | fatal("DSA keys must be 1024 bits"); |
1266 | if (!quiet) | ||
1267 | printf("Generating public/private %s key pair.\n", key_type_name); | ||
1268 | private = key_generate(type, bits); | 1268 | private = key_generate(type, bits); |
1269 | if (private == NULL) { | 1269 | if (private == NULL) { |
1270 | fprintf(stderr, "key_generate failed"); | 1270 | fprintf(stderr, "key_generate failed"); |