- (tim) [ssh-keygen.c] Move DSA length test after setting default when

bits == 0.
This commit is contained in:
Tim Rice 2005-11-28 17:45:32 -08:00
parent ac0c8a533d
commit 660c3405f9
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
20051129
- (tim) [ssh-keygen.c] Move DSA length test after setting default when
bits == 0.
20051128
- (dtucker) [regress/yes-head.sh] Work around breakage caused by some
versions of GNU head. Based on patch from zappaman at buraphalinux.org
@ -3375,4 +3379,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.4012 2005/11/28 11:28:59 dtucker Exp $
$Id: ChangeLog,v 1.4013 2005/11/29 01:45:32 tim Exp $

View File

@ -1259,12 +1259,12 @@ main(int ac, char **av)
fprintf(stderr, "unknown key type %s\n", key_type_name);
exit(1);
}
if (type == KEY_DSA && bits != 1024)
fatal("DSA keys must be 1024 bits");
if (!quiet)
printf("Generating public/private %s key pair.\n", key_type_name);
if (bits == 0)
bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS;
if (type == KEY_DSA && bits != 1024)
fatal("DSA keys must be 1024 bits");
private = key_generate(type, bits);
if (private == NULL) {
fprintf(stderr, "key_generate failed");