[Pkg-gnupg-commit] [gnupg2] 107/205: gpg: Improve message when asking for key capabilities.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit fc30c079a348436868968850dabf653b91f82419
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Mar 22 20:24:52 2016 +0100

    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 at gnupg.org>
---
 g10/keygen.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/g10/keygen.c b/g10/keygen.c
index 9cfa5f7..a7d7d27 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: "));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list