From 257661d6ae0ca376df758c38fabab2316d10e3a9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 6 Jun 2018 11:50:58 +0200 Subject: 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 --- doc/gpg.texi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'doc/gpg.texi') diff --git a/doc/gpg.texi b/doc/gpg.texi index a12b5afee..642805f88 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -353,6 +353,14 @@ may thus be used to see what keys @command{@gpgname} might use. In particular external methods as defined by @option{--auto-key-locate} may be used to locate a key. Only public keys are listed. +@item --show-keys +@opindex show-keys +This commands takes OpenPGP keys as input and prints information about +them in the same way the command @option{--list-keys} does for +imported key. No internal state is changed. For automated processing +this command should be combined with the option +@option{--with-colons}. + @item --fingerprint @opindex fingerprint List all keys (or the specified ones) along with their @@ -2305,7 +2313,8 @@ opposite meaning. The options are: Show a listing of the key as imported right before it is stored. This can be combined with the option @option{--dry-run} to only look at keys; the option @option{show-only} is a shortcut for this - combination. Note that suffixes like '#' for "sec" and "sbb" lines + combination. The command @option{--show-keys} is another shortcut + for this. Note that suffixes like '#' for "sec" and "sbb" lines may or may not be printed. @item import-export -- cgit v1.2.3 From 70f26e4263364f4b521c7856c38ba7ee59e38445 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 6 Jun 2018 17:25:51 +0200 Subject: doc: Typo fixes -- Reported-by: Claus Assmann Signed-off-by: Werner Koch --- doc/gpg.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/gpg.texi') diff --git a/doc/gpg.texi b/doc/gpg.texi index 642805f88..9db23652c 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -328,7 +328,7 @@ following the "sig" tag (and thus before the flags described below. A "!" indicates that the signature has been successfully verified, a "-" denotes a bad signature and a "%" is used if an error occurred while checking the signature (e.g. a non supported algorithm). Signatures -where the public key is not availabale are not listed; to see their +where the public key is not available are not listed; to see their keyids the command @option{--list-sigs} can be used. For each signature listed, there are several flags in between the @@ -3377,7 +3377,7 @@ absolute date in the form YYYY-MM-DD. Defaults to "0". @opindex default-new-key-algo @var{string} This option can be used to change the default algorithms for key generation. The @var{string} is similar to the arguments required for -the command @option{--quick-add-key} but slighly different. For +the command @option{--quick-add-key} but slightly different. For example the current default of @code{"rsa2048/cert,sign+rsa2048/encr"} (or @code{"rsa3072"}) can be changed to the value of what we currently call future default, which is @code{"ed25519/cert,sign+cv25519/encr"}. -- cgit v1.2.3 From d2bc66f241a66cc95140cbb3a07555f6301290ed Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 11 Jun 2018 08:46:37 +0200 Subject: gpg: Set some list options with --show-keys * g10/gpg.c (main): Set some list options. -- The new command --show-keys is commonly used to check the content of a file with keys. In this case it can be expected that all included subkeys and uids are of interested, even when they are already expired or have been revoked. Signed-off-by: Werner Koch --- doc/gpg.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/gpg.texi') diff --git a/doc/gpg.texi b/doc/gpg.texi index 9db23652c..5f114c519 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -356,9 +356,11 @@ be used to locate a key. Only public keys are listed. @item --show-keys @opindex show-keys This commands takes OpenPGP keys as input and prints information about -them in the same way the command @option{--list-keys} does for -imported key. No internal state is changed. For automated processing -this command should be combined with the option +them in the same way the command @option{--list-keys} does for locally +stored key. In addition the list options @code{show-unusable-uids}, +@code{show-unusable-subkeys}, @code{show-notations} and +@code{show-policy-urls} are also enabled. As usual for automated +processing, this command should be combined with the option @option{--with-colons}. @item --fingerprint -- cgit v1.2.3 From 2ddfb5bef920919443309ece9fa2930282bbce85 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Tue, 12 Jun 2018 00:41:59 -0400 Subject: gpg: Add new usage option for drop-subkey filters. * g10/import.c (impex_filter_getval): Add new "usage" property for drop-subkey filter. -- For example, this permits extraction of only encryption-capable subkeys like so: gpg --export-filter 'drop-subkey=usage !~ e' --export $FPR GnuPG-Bug-id: 4019 Signed-off-by: Daniel Kahn Gillmor --- doc/gpg.texi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/gpg.texi') diff --git a/doc/gpg.texi b/doc/gpg.texi index 5f114c519..4cfd00079 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2428,6 +2428,11 @@ The available properties are: Boolean indicating whether a key or subkey is a secret one. (drop-subkey) + @item usage + A string indicating the usage flags for the subkey, from the + sequence ``ecsa?''. For example, a subkey capable of just signing + and authentication would be an exact match for ``sa''. (drop-subkey) + @item sig_created @itemx sig_created_d The first is the timestamp a signature packet was created. The -- cgit v1.2.3