gpg: Add new usage option for drop-subkey filters.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 12 Jun 2018 04:41:59 +0000 (00:41 -0400)
committerWerner Koch <wk@gnupg.org>
Tue, 12 Jun 2018 07:04:13 +0000 (09:04 +0200)
commit86b64876bef0d8c4be8e309fcf3e2ce21e65a947
tree8e19619b700c66d5ec0d8f7f33196cf79ab6032e
parentdc96fd883571a975cfea0882fd38d7b0dd78775b
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 <dkg@fifthhorseman.net>
(cherry picked from commit 2ddfb5bef920919443309ece9fa2930282bbce85)
doc/gpg.texi
g10/import.c