diff options
author | Werner Koch <[email protected]> | 2024-01-25 09:00:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-01-25 09:35:34 +0000 |
commit | 2a4180812ac21257a82c091df1bec1b6e087a0bd (patch) | |
tree | 331dfbb2942fc972d5564c2d14471eee1446c6eb /tools/gpg-card.c | |
parent | po: Update Japanese Translation. (diff) | |
download | gnupg-2a4180812ac21257a82c091df1bec1b6e087a0bd.tar.gz gnupg-2a4180812ac21257a82c091df1bec1b6e087a0bd.zip |
card: Tweak the checkcmds sub-command.
* tools/gpg-card.c (cmd_checkkeys): Skip not found keys.
Diffstat (limited to 'tools/gpg-card.c')
-rw-r--r-- | tools/gpg-card.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c index 185d04b62..f65a17b3c 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -1397,11 +1397,12 @@ cmd_checkkeys (card_info_t callerinfo, char *argstr) if (!callerinfo) return print_help - ("CHECKKEYS [--ondisk] [--delete-clear-copy]\n\n" + ("CHECKKEYS [--ondisk] [--delete-clear-copy] [--delete-protected-copy]" + "\n\n" "Print a list of keys on all inserted cards. With --ondisk only\n" "keys are listed which also have a copy on disk. Missing shadow\n" - "keys are created. With --delete-clear, copies of keys also stored\n" - "on disk without any protection will be deleted.\n" + "keys are created. With --delete-clear-copy, copies of keys also\n" + "stored on disk without any protection will be deleted.\n" , 0); @@ -1461,11 +1462,13 @@ cmd_checkkeys (card_info_t callerinfo, char *argstr) scd_readkey (kinfo->keyref, 1, NULL); err = scd_havekey_info (kinfo->grip, &infostr); } - if (err) + if (err && gpg_err_code (err) != GPG_ERR_NOT_FOUND) log_error ("Error getting infos for a key: %s\n", gpg_strerror (err)); - if (opt_ondisk && infostr && !strcmp (infostr, "shadowed")) + if (gpg_err_code (err) == GPG_ERR_NOT_FOUND) + ; /* does not make sense to show this. */ + else if (opt_ondisk && infostr && !strcmp (infostr, "shadowed")) ; /* Don't print this one. */ else { |