gpg: New option --with-tofu-info.
authorWerner Koch <wk@gnupg.org>
Thu, 25 Aug 2016 07:26:36 +0000 (09:26 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 25 Aug 2016 07:37:56 +0000 (09:37 +0200)
commit19d12be3cea5b4ee8153287a2f2442913a5e07a1
tree1a75c09e6b44995832b02c2a5adad5a10a40ae22
parent0f1f02acc1cdcc2cf74a97b05507bb1f062f8af2
gpg: New option --with-tofu-info.

* g10/gpg.c (oWithTofuInfo): New.
(opts): Add --with-tofu-info.
(main): Set opt.with_tofu_info.
* g10/options.h (struct opt): Add field WITH_TOFU_INFO.
* g10/tofu.c (show_statistics): Add optional arg OUTFP and enter
special mode if not NULL.  Change all callers.
(tofu_write_tfs_record): New.
* g10/keylist.c (list_keyblock_colon): Do not print the tofu policy as
part of the "uid" record.  Print a new "tfs" record if the new option
is set.
* tests/openpgp/tofu.scm (getpolicy): Change from UID to TFS record.
--

A separate option is required to avoid slowing down key listings.
Foer example the current code takes for a keylisting in tofu+pgp mode
17 seconds while it takes more than 5 minutes if the option is used.

Signed-off-by: Werner Koch <wk@gnupg.org>
doc/DETAILS
g10/gpg.c
g10/gpgv.c
g10/keylist.c
g10/options.h
g10/test-stubs.c
g10/tofu.c
g10/tofu.h
tests/openpgp/tofu.scm