From a4e26f2ee852003707857ab0635b783acb89a2f8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 9 Apr 2018 10:36:02 +0200 Subject: [PATCH] doc: Document --key-edit:change-usage * g10/keyedit.c (menu_changeusage): Make strings translatable. -- GnuPG-bug-id: 3816 Signed-off-by: Werner Koch --- doc/gpg.texi | 9 +++++++++ g10/keyedit.c | 8 +++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/gpg.texi b/doc/gpg.texi index d840b8573..3c505c94d 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -1007,6 +1007,15 @@ signing. Make the key as small as possible. This removes all signatures from each user ID except for the most recent self-signature. + @item change-usage + @opindex keyedit:change-usage + Change the usage flags (capabilities) of the primary key or of + subkeys. These usage flags (e.g. Certify, Sign, Authenticate, + Encrypt) are set during key creation. Sometimes it is useful to + have the opportunity to change them (for example to add + Authenticate) after they have been created. Please take care when + doing this, the possible usage flags depend on the key algorithm. + @item cross-certify @opindex keyedit:cross-certify Add cross-certification signatures to signing subkeys that may not diff --git a/g10/keyedit.c b/g10/keyedit.c index 4ade5cdba..7cd883d78 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -4535,10 +4535,10 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) return 0; } else if (n1) - tty_printf ("Changing usage of a subkey.\n"); + tty_printf (_("Changing usage of a subkey.\n")); else { - tty_printf ("Changing usage of the primary key.\n"); + tty_printf (_("Changing usage of the primary key.\n")); mainkey = 1; } @@ -4578,6 +4578,8 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) if ((mainkey && main_pk->version < 4) || (!mainkey && sub_pk->version < 4)) { + /* Note: This won't happen because we don't support + * v3 keys anymore. */ log_info ("You can't change the capabilities of a v3 key\n"); return 0; } @@ -4602,7 +4604,7 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) if (rc) { log_error ("make_keysig_packet failed: %s\n", - gpg_strerror (rc)); + gpg_strerror (rc)); return 0; }