mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
0f1f02acc1
commit
19d12be3ce
9 changed files with 107 additions and 38 deletions
12
g10/gpg.c
12
g10/gpg.c
|
@ -193,6 +193,11 @@ enum cmd_and_opt_values
|
|||
oWithKeygrip,
|
||||
oWithSecret,
|
||||
oWithWKDHash,
|
||||
oWithColons,
|
||||
oWithKeyData,
|
||||
oWithTofuInfo,
|
||||
oWithSigList,
|
||||
oWithSigCheck,
|
||||
oAnswerYes,
|
||||
oAnswerNo,
|
||||
oKeyring,
|
||||
|
@ -259,10 +264,6 @@ enum cmd_and_opt_values
|
|||
oNoOptions,
|
||||
oNoBatch,
|
||||
oHomedir,
|
||||
oWithColons,
|
||||
oWithKeyData,
|
||||
oWithSigList,
|
||||
oWithSigCheck,
|
||||
oSkipVerify,
|
||||
oSkipHiddenRecipients,
|
||||
oNoSkipHiddenRecipients,
|
||||
|
@ -699,6 +700,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_s_s (oHomedir, "homedir", "@"),
|
||||
ARGPARSE_s_n (oNoBatch, "no-batch", "@"),
|
||||
ARGPARSE_s_n (oWithColons, "with-colons", "@"),
|
||||
ARGPARSE_s_n (oWithTofuInfo,"with-tofu-info", "@"),
|
||||
ARGPARSE_s_n (oWithKeyData,"with-key-data", "@"),
|
||||
ARGPARSE_s_n (oWithSigList,"with-sig-list", "@"),
|
||||
ARGPARSE_s_n (oWithSigCheck,"with-sig-check", "@"),
|
||||
|
@ -2650,6 +2652,8 @@ main (int argc, char **argv)
|
|||
case oHomedir: break;
|
||||
case oNoBatch: opt.batch = 0; break;
|
||||
|
||||
case oWithTofuInfo: opt.with_tofu_info = 1; break;
|
||||
|
||||
case oWithKeyData: opt.with_key_data=1; /*FALLTHRU*/
|
||||
case oWithColons: opt.with_colons=':'; break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue