change default keygen key type (#760)

* change default keygen key type

* increase DEFAULT_BITS_ECDSA to 384

* change default key path to ECDSA
This commit is contained in:
Tess Gauthier 2025-02-21 11:26:04 -08:00 committed by GitHub
parent 41734eb591
commit 8514f78233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,11 @@
#include "sk-api.h" /* XXX for SSH_SK_USER_PRESENCE_REQD; remove */
#include "cipher.h"
#ifdef WINDOWS
#define DEFAULT_KEY_TYPE_NAME "ecdsa"
#else
#define DEFAULT_KEY_TYPE_NAME "ed25519"
#endif /* WINDOWS */
/*
* Default number of bits in the RSA, DSA and ECDSA keys. These value can be
@ -82,7 +86,11 @@
*/
#define DEFAULT_BITS 3072
#define DEFAULT_BITS_DSA 1024
#ifdef WINDOWS
#define DEFAULT_BITS_ECDSA 384
#else
#define DEFAULT_BITS_ECDSA 256
#endif /* WINDOWS */
static int quiet = 0;
@ -259,7 +267,11 @@ ask_filename(struct passwd *pw, const char *prompt)
char *name = NULL;
if (key_type_name == NULL)
#ifdef WINDOWS
name = _PATH_SSH_CLIENT_ID_ECDSA;
#else
name = _PATH_SSH_CLIENT_ID_ED25519;
#endif /* WINDOWS */
else {
switch (sshkey_type_from_name(key_type_name)) {
#ifdef WITH_DSA