diff options
author | David Shaw <[email protected]> | 2005-02-06 17:38:43 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-02-06 17:38:43 +0000 |
commit | 2dbfc709adac559bf1f172de4ff595a815bd7d27 (patch) | |
tree | da4d7f8d3893c66d4e5207b796b84d7cef88a52a /g10/trustdb.c | |
parent | * gpg.sgml: Note that level 0 signatures are always accepted (diff) | |
download | gnupg-2dbfc709adac559bf1f172de4ff595a815bd7d27.tar.gz gnupg-2dbfc709adac559bf1f172de4ff595a815bd7d27.zip |
* trustdb.h, trustdb.c (trustdb_check_or_update): New. If the trustdb
is dirty and --interactive is set, do an --update-trustdb. If not
interactive, do a --check_trustdb unless --no-auto-check-trustdb is
set.
* import.c (import_keys_internal): Moved from here.
* keyserver.c (keyserver_refresh): Call it here after all refreshing
has happened so that we don't rebuild after each preferred keyserver
set of imports, but do one big rebuild at the end. This is Debian bug
#293816, noted by Kurt Roeckx.
Diffstat (limited to 'g10/trustdb.c')
-rw-r--r-- | g10/trustdb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c index 8dccef7a9..d69b872ca 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -624,6 +624,20 @@ trustdb_pending_check(void) return pending_check_trustdb; } +/* If the trustdb is dirty, and we're interactive, update it. + Otherwise, check it unless no-auto-check-trustdb is set. */ +void +trustdb_check_or_update(void) +{ + if(trustdb_pending_check()) + { + if(opt.interactive) + update_trustdb(); + else if(!opt.no_auto_check_trustdb) + check_trustdb(); + } +} + void read_trust_options(byte *trust_model,ulong *created,ulong *nextcheck, byte *marginals,byte *completes,byte *cert_depth) |