[ssh-keygen.c]
     Populate default key sizes before checking them; from & ok tim@
This commit is contained in:
Darren Tucker 2005-11-29 13:10:24 +11:00
parent 660c3405f9
commit 3af2ac56a2
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,10 @@
20051129 20051129
- (tim) [ssh-keygen.c] Move DSA length test after setting default when - (tim) [ssh-keygen.c] Move DSA length test after setting default when
bits == 0. bits == 0.
- (dtucker) OpenBSD CVS Sync
- dtucker@cvs.openbsd.org 2005/11/29 02:04:55
[ssh-keygen.c]
Populate default key sizes before checking them; from & ok tim@
20051128 20051128
- (dtucker) [regress/yes-head.sh] Work around breakage caused by some - (dtucker) [regress/yes-head.sh] Work around breakage caused by some
@ -3379,4 +3383,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.4013 2005/11/29 01:45:32 tim Exp $ $Id: ChangeLog,v 1.4014 2005/11/29 02:10:24 dtucker Exp $

View File

@ -12,7 +12,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: ssh-keygen.c,v 1.134 2005/11/28 05:16:53 dtucker Exp $"); RCSID("$OpenBSD: ssh-keygen.c,v 1.135 2005/11/29 02:04:55 dtucker Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/pem.h> #include <openssl/pem.h>
@ -1259,12 +1259,12 @@ main(int ac, char **av)
fprintf(stderr, "unknown key type %s\n", key_type_name); fprintf(stderr, "unknown key type %s\n", key_type_name);
exit(1); exit(1);
} }
if (!quiet)
printf("Generating public/private %s key pair.\n", key_type_name);
if (bits == 0) if (bits == 0)
bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS; bits = (type == KEY_DSA) ? DEFAULT_BITS_DSA : DEFAULT_BITS;
if (type == KEY_DSA && bits != 1024) if (type == KEY_DSA && bits != 1024)
fatal("DSA keys must be 1024 bits"); fatal("DSA keys must be 1024 bits");
if (!quiet)
printf("Generating public/private %s key pair.\n", key_type_name);
private = key_generate(type, bits); private = key_generate(type, bits);
if (private == NULL) { if (private == NULL) {
fprintf(stderr, "key_generate failed"); fprintf(stderr, "key_generate failed");