1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-03-22 20:24:52 +01:00
parent 7f919063d3
commit fc30c079a3
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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: "));