mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: New command --show-keys.
* g10/gpg.c (aShowKeys): New const.
(opts): New command --show-keys.
(main): Implement command.
* g10/import.c (import_keys_internal): Don't print stats in show-only
mode.
(import_one): Be silent in show-only mode.
--
Using
--import --import-options show-only
to look at a key is too cumbersome. Provide this shortcut and also
remove some diagnostic cruft in this case.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 257661d6ae
)
This commit is contained in:
parent
7c004dd58f
commit
dc87a3341f
3 changed files with 28 additions and 2 deletions
11
g10/gpg.c
11
g10/gpg.c
|
@ -149,6 +149,7 @@ enum cmd_and_opt_values
|
|||
aSearchKeys,
|
||||
aRefreshKeys,
|
||||
aFetchKeys,
|
||||
aShowKeys,
|
||||
aExport,
|
||||
aExportSecret,
|
||||
aExportSecretSub,
|
||||
|
@ -498,6 +499,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
N_("update all keys from a keyserver")),
|
||||
ARGPARSE_c (aLocateKeys, "locate-keys", "@"),
|
||||
ARGPARSE_c (aFetchKeys, "fetch-keys" , "@" ),
|
||||
ARGPARSE_c (aShowKeys, "show-keys" , "@" ),
|
||||
ARGPARSE_c (aExportSecret, "export-secret-keys" , "@" ),
|
||||
ARGPARSE_c (aExportSecretSub, "export-secret-subkeys" , "@" ),
|
||||
ARGPARSE_c (aExportSshKey, "export-ssh-key", "@" ),
|
||||
|
@ -733,6 +735,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_c (aListKeys, "list-key", "@"), /* alias */
|
||||
ARGPARSE_c (aListSigs, "list-sig", "@"), /* alias */
|
||||
ARGPARSE_c (aCheckKeys, "check-sig", "@"), /* alias */
|
||||
ARGPARSE_c (aShowKeys, "show-key", "@"), /* alias */
|
||||
ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
|
||||
ARGPARSE_s_n (oSkipHiddenRecipients, "skip-hidden-recipients", "@"),
|
||||
ARGPARSE_s_n (oNoSkipHiddenRecipients, "no-skip-hidden-recipients", "@"),
|
||||
|
@ -2602,6 +2605,13 @@ main (int argc, char **argv)
|
|||
greeting=1;
|
||||
break;
|
||||
|
||||
case aShowKeys:
|
||||
set_cmd (&cmd, pargs.r_opt);
|
||||
opt.import_options |= IMPORT_SHOW;
|
||||
opt.import_options |= IMPORT_DRY_RUN;
|
||||
opt.import_options &= ~IMPORT_REPAIR_KEYS;
|
||||
break;
|
||||
|
||||
case aDetachedSign: detached_sig = 1; set_cmd( &cmd, aSign ); break;
|
||||
|
||||
case aDecryptFiles: multifile=1; /* fall through */
|
||||
|
@ -4556,6 +4566,7 @@ main (int argc, char **argv)
|
|||
case aFastImport:
|
||||
opt.import_options |= IMPORT_FAST; /* fall through */
|
||||
case aImport:
|
||||
case aShowKeys:
|
||||
import_keys (ctrl, argc? argv:NULL, argc, NULL,
|
||||
opt.import_options, opt.key_origin, opt.key_origin_url);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue