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
|
@ -494,7 +494,9 @@ import_keys_internal (ctrl_t ctrl, iobuf_t inp, char **fnames, int nnames,
|
|||
|
||||
if (!stats_handle)
|
||||
{
|
||||
import_print_stats (stats);
|
||||
if ((options & (IMPORT_SHOW | IMPORT_DRY_RUN))
|
||||
!= (IMPORT_SHOW | IMPORT_DRY_RUN))
|
||||
import_print_stats (stats);
|
||||
import_release_stats_handle (stats);
|
||||
}
|
||||
|
||||
|
@ -1635,6 +1637,10 @@ import_one (ctrl_t ctrl,
|
|||
int any_filter = 0;
|
||||
KEYDB_HANDLE hd = NULL;
|
||||
|
||||
/* If show-only is active we don't won't any extra output. */
|
||||
if ((options & (IMPORT_SHOW | IMPORT_DRY_RUN)))
|
||||
silent = 1;
|
||||
|
||||
/* Get the key and print some info about it. */
|
||||
node = find_kbnode( keyblock, PKT_PUBLIC_KEY );
|
||||
if (!node )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue