diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-05-28 04:40:14 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-05-28 04:40:14 +0000 |
commit | 57ef223387f0b125c3f8246ca4ba337d157d6d6b (patch) | |
tree | 252dd3a3e76ade0ed8550dd85fe6a24f0699dde9 /usr.bin | |
parent | 93e8e921b7832eb6534d396dc03a40ad02fa620e (diff) |
make ssh-keygen default to ed25519 keys when compiled without
OpenSSL; bz#2388, ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 1ae75c17520..c4e466c2240 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.272 2015/05/21 12:01:19 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.273 2015/05/28 04:40:13 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -52,6 +52,12 @@ #include "ssh-pkcs11.h" #endif +#ifdef WITH_OPENSSL +# define DEFAULT_KEY_TYPE_NAME "rsa" +#else +# define DEFAULT_KEY_TYPE_NAME "ed25519" +#endif + /* Number of bits in the RSA/DSA key. This value can be set on the command line. */ #define DEFAULT_BITS 2048 #define DEFAULT_BITS_DSA 1024 @@ -2561,7 +2567,7 @@ main(int argc, char **argv) } if (key_type_name == NULL) - key_type_name = "rsa"; + key_type_name = DEFAULT_KEY_TYPE_NAME; type = sshkey_type_from_name(key_type_name); type_bits_valid(type, key_type_name, &bits); |