Home GnuPG
Diffusion GnuPG 560d85ecff42

gpg: Improve the "secret key available" notice in keyedit.c

Description

gpg: Improve the "secret key available" notice in keyedit.c

* g10/keyedit.c (KEYEDIT_NEED_SUBSK): New.
(cmds): Add this flag to keytocard, bkuptocard, expire, and passwd.
(keyedit_menu): Check whether only subkeys are available and take care
of that in the command check and in the HELP listing.  Also print a
different notice if only subkeys are available.

Print "Secret key is available" and the bailing out in all commands
which require the _primary_ secret key was surprising. Now we print
another notice and adjust the checks.

  • GnuPG-bug-id: T3463
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Oct 24 2017, 10:56 AM
Parents
rG016538d82867: gpg: Remove unused flags from keyedit.c.
Branches
Unknown
Tags
Unknown
Tasks
T3463: UI says “Secret key is available.” in gpg when it is not