Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change default keygen key type #760

Open
wants to merge 3 commits into
base: latestw_all
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ssh-keygen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand Down Expand Up @@ -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
Expand Down