diff options
author | Werner Koch <[email protected]> | 2016-08-25 07:26:36 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-08-25 07:37:56 +0000 |
commit | 19d12be3cea5b4ee8153287a2f2442913a5e07a1 (patch) | |
tree | 1a75c09e6b44995832b02c2a5adad5a10a40ae22 /g10/tofu.h | |
parent | gpg: Change TOFU_STATS to return timestamps. (diff) | |
download | gnupg-19d12be3cea5b4ee8153287a2f2442913a5e07a1.tar.gz gnupg-19d12be3cea5b4ee8153287a2f2442913a5e07a1.zip |
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 <[email protected]>
Diffstat (limited to 'g10/tofu.h')
-rw-r--r-- | g10/tofu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/tofu.h b/g10/tofu.h index e3ec81965..d6854e9bf 100644 --- a/g10/tofu.h +++ b/g10/tofu.h @@ -88,6 +88,10 @@ int tofu_register (ctrl_t ctrl, PKT_public_key *pk, const char *user_id, interest when the trust model is tofu+pgp (TM_TOFU_PGP). */ int tofu_wot_trust_combine (int tofu, int wot); +/* Write a "tfs" record for a --with-colons listing. */ +gpg_error_t tofu_write_tfs_record (ctrl_t ctrl, estream_t fp, + PKT_public_key *pk, const char *user_id); + /* Determine the validity (TRUST_NEVER, etc.) of the binding <PK, USER_ID>. If MAY_ASK is 1, then this function may interact with the user. If not, TRUST_UNKNOWN is returned. If an |