diff options
author | Werner Koch <[email protected]> | 2016-07-01 14:24:04 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-07-01 14:28:29 +0000 |
commit | 5137bf73ccc98a72c2eeac148e4d4b5d58f0a854 (patch) | |
tree | 1649345e632dcc2198b1ee96dafe80c019554b4c /doc | |
parent | gpg: Allow to cache the mbox in a user id struct. (diff) | |
download | gnupg-5137bf73ccc98a72c2eeac148e4d4b5d58f0a854.tar.gz gnupg-5137bf73ccc98a72c2eeac148e4d4b5d58f0a854.zip |
gpg: New option --import-filter
* g10/gpg.c (oImportFilter): New.
(opts): Add --import-filter.
(main): Handle option.
* g10/import.c: Include recsel.h, init.h, and mbox-util.h.
(import_keep_uid): New global var.
(cleanup_import_globals): New.
(parse_and_set_import_filter): New.
(filter_getval): New.
(apply_keep_uid_filter): New.
(import_one): Apply filter if set.
--
Funny new option. It can for example be used to export a key with
only one user id:
gpg --no-options --import --import-options import-export \
--import-filter keep-uid='[email protected]' \
< full-key.pub > key-with-one-uid.pub
More features will eventually be added.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gpg.texi | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/gpg.texi b/doc/gpg.texi index 6f0249ab1..9a0622199 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2218,6 +2218,45 @@ opposite meaning. The options are: Defaults to no. @end table +@item --import-filter @code{@var{name}=@var{expr}} +@opindex import-filter +This option defines an import filter which is implied to the imported +keyblock right before it will be stored. @var{name} defines the type +of filter to use, @var{expr} the expression to evaluate. The option +can be used several times which then appends more expression to the +same @var{name}. + +@noindent +The available filter types are: + +@table @asis + + @item keep-uid + This filter will keep a user id packet and its dependent packets in + the keyblock if the expression evaluates to true. + +@end table + +The syntax for the expression is defined in the appendix (FIXME). The +property names for the expressions depend on the actual filter type +and are indicated in the following table. + +The available properties are: + +@table @asis + + @item uid + A string with the user id. (keep-uid) + + @item mbox + The addr-spec part of a user id with mailbox or the empty string. + (keep-uid) + + @item primary + Boolean indicating whether the user id is the primary one. (keep-uid) + +@end table + @item --export-options @code{parameters} @opindex export-options This is a space or comma delimited string that gives options for |