summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2005-11-28 17:45:32 -0800
committerTim Rice <tim@multitalents.net>2005-11-28 17:45:32 -0800
commit660c3405f95fa3f1169cbeaba2bc74a37bcbea9e (patch)
treed2ebdde691985bb204dcad62d4ff5833336a1eb0 /ssh-keygen.c
parentac0c8a533d7b79f8404f904a05655e48aa792a45 (diff)
- (tim) [ssh-keygen.c] Move DSA length test after setting default when
bits == 0.
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index b4c651d22..3a6174ac1 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -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 (type == KEY_DSA && bits != 1024)
1263 fatal("DSA keys must be 1024 bits");
1264 if (!quiet) 1262 if (!quiet)
1265 printf("Generating public/private %s key pair.\n", key_type_name); 1263 printf("Generating public/private %s key pair.\n", key_type_name);
1266 if (bits == 0) 1264 if (bits == 0)
1267 bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS; 1265 bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS;
1266 if (type == KEY_DSA && bits != 1024)
1267 fatal("DSA keys must be 1024 bits");
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");