- Add OpenSSL sanity check: verify that header version matches version
reported by library
- (djm) Fix some bugs I introduced into ssh-rand-helper yesterday
+ - OpenBSD CVS Sync
+ - djm@cvs.openbsd.org 2001/12/21 08:52:22
+ [ssh-keygen.1 ssh-keygen.c]
+ Remove default (rsa1) key type; ok markus@
20020121
- (djm) Rework ssh-rand-helper:
-.\" $OpenBSD: ssh-keygen.1,v 1.51 2001/11/21 18:49:14 stevesk Exp $
+.\" $OpenBSD: ssh-keygen.1,v 1.52 2001/12/21 08:52:22 djm Exp $
.\"
.\" -*- nroff -*-
.\"
generates, manages and converts authentication keys for
.Xr ssh 1 .
.Nm
-defaults to generating a RSA1 key for use by SSH protocol version 1.
-Specifying the
+can create RSA keys for use by SSH protocol version 1 and RSA or DSA
+keys for use by SSH protocol version 2. The type of key to be generated
+is specified with the
.Fl t
-option instead creates a key for use by SSH protocol version 2.
+option.
.Pp
Normally each user wishing to use SSH
with RSA or DSA authentication runs this once to create the authentication
or
.Dq dsa
for protocol version 2.
-The default is
-.Dq rsa1 .
.It Fl B
Show the bubblebabble digest of specified private or public key file.
.It Fl C Ar comment
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.86 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.87 2001/12/21 08:52:22 djm Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
int convert_from_ssh2 = 0;
int print_public = 0;
-/* default to RSA for SSH-1 */
-char *key_type_name = "rsa1";
+char *key_type_name = NULL;
/* argv0 */
#ifdef HAVE___PROGNAME
int
main(int ac, char **av)
{
- char dotsshdir[16 * 1024], comment[1024], *passphrase1, *passphrase2;
+ char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
char *reader_id = NULL;
Key *private, *public;
struct passwd *pw;
printf("Too many arguments.\n");
usage();
}
+ if (key_type_name == NULL) {
+ printf("You must specify a key type (-t).\n");
+ usage();
+ }
if (change_passphrase && change_comment) {
printf("Can only have one of -p and -c.\n");
usage();