diff options
-rw-r--r-- | ssh-keygen.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 3c2bd964a..ff1d31b91 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.272 2015/05/21 12:01:19 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.273 2015/05/28 04:40:13 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -58,6 +58,12 @@ | |||
58 | #include "krl.h" | 58 | #include "krl.h" |
59 | #include "digest.h" | 59 | #include "digest.h" |
60 | 60 | ||
61 | #ifdef WITH_OPENSSL | ||
62 | # define DEFAULT_KEY_TYPE_NAME "rsa" | ||
63 | #else | ||
64 | # define DEFAULT_KEY_TYPE_NAME "ed25519" | ||
65 | #endif | ||
66 | |||
61 | /* Number of bits in the RSA/DSA key. This value can be set on the command line. */ | 67 | /* Number of bits in the RSA/DSA key. This value can be set on the command line. */ |
62 | #define DEFAULT_BITS 2048 | 68 | #define DEFAULT_BITS 2048 |
63 | #define DEFAULT_BITS_DSA 1024 | 69 | #define DEFAULT_BITS_DSA 1024 |
@@ -2580,7 +2586,7 @@ main(int argc, char **argv) | |||
2580 | } | 2586 | } |
2581 | 2587 | ||
2582 | if (key_type_name == NULL) | 2588 | if (key_type_name == NULL) |
2583 | key_type_name = "rsa"; | 2589 | key_type_name = DEFAULT_KEY_TYPE_NAME; |
2584 | 2590 | ||
2585 | type = sshkey_type_from_name(key_type_name); | 2591 | type = sshkey_type_from_name(key_type_name); |
2586 | type_bits_valid(type, key_type_name, &bits); | 2592 | type_bits_valid(type, key_type_name, &bits); |