From fc30c079a348436868968850dabf653b91f82419 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 22 Mar 2016 20:24:52 +0100 Subject: [PATCH] gpg: Improve message when asking for key capabilities. * g10/keygen.c (ask_key_flags): Improve message. -- Because the curve is only selected after the capabilities are queried we do not know whether ECDSA or EdDSA will eventually be used. When printing the possible capabilities we now use print "ECDSA/EdDSA" for the algorithm. Signed-off-by: Werner Koch --- g10/keygen.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/g10/keygen.c b/g10/keygen.c index 9cfa5f7bb..a7d7d278b 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -1658,7 +1658,7 @@ print_key_flags(int flags) } -/* Ask for the key flags and return them. CURRENT gives the curren +/* Ask for the key flags and return them. CURRENT gives the current * usage which should normally be given as 0. */ unsigned int ask_key_flags (int algo, int subkey, unsigned int current) @@ -1673,10 +1673,10 @@ ask_key_flags (int algo, int subkey, unsigned int current) a = Toggle authentication capability q = Finish */ - const char *togglers=_("SsEeAaQq"); - char *answer=NULL; + const char *togglers = _("SsEeAaQq"); + char *answer = NULL; const char *s; - unsigned int possible=openpgp_pk_algo_usage(algo); + unsigned int possible = openpgp_pk_algo_usage(algo); if ( strlen(togglers) != 8 ) { @@ -1701,7 +1701,9 @@ ask_key_flags (int algo, int subkey, unsigned int current) { tty_printf("\n"); tty_printf(_("Possible actions for a %s key: "), - openpgp_pk_algo_name (algo)); + (algo == PUBKEY_ALGO_ECDSA + || algo == PUBKEY_ALGO_EDDSA) + ? "ECDSA/EdDSA" : openpgp_pk_algo_name (algo)); print_key_flags(possible); tty_printf("\n"); tty_printf(_("Current allowed actions: "));