summaryrefslogtreecommitdiff
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
parentac0c8a533d7b79f8404f904a05655e48aa792a45 (diff)
- (tim) [ssh-keygen.c] Move DSA length test after setting default when
bits == 0.
-rw-r--r--ChangeLog6
-rw-r--r--ssh-keygen.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c8c053f6d..1be6498d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120051129
2 - (tim) [ssh-keygen.c] Move DSA length test after setting default when
3 bits == 0.
4
120051128 520051128
2 - (dtucker) [regress/yes-head.sh] Work around breakage caused by some 6 - (dtucker) [regress/yes-head.sh] Work around breakage caused by some
3 versions of GNU head. Based on patch from zappaman at buraphalinux.org 7 versions of GNU head. Based on patch from zappaman at buraphalinux.org
@@ -3375,4 +3379,4 @@
3375 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3379 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3376 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3380 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3377 3381
3378$Id: ChangeLog,v 1.4012 2005/11/28 11:28:59 dtucker Exp $ 3382$Id: ChangeLog,v 1.4013 2005/11/29 01:45:32 tim Exp $
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");