aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-02-06 17:38:43 +0000
committerDavid Shaw <[email protected]>2005-02-06 17:38:43 +0000
commit2dbfc709adac559bf1f172de4ff595a815bd7d27 (patch)
treeda4d7f8d3893c66d4e5207b796b84d7cef88a52a /g10/import.c
parent* gpg.sgml: Note that level 0 signatures are always accepted (diff)
downloadgnupg-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 '')
-rw-r--r--g10/import.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/g10/import.c b/g10/import.c
index 4119b01c1..0554e4dbb 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1,6 +1,6 @@
/* import.c - import a key into our key storage.
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ * 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -193,18 +193,15 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
import_print_stats (stats);
import_release_stats_handle (stats);
}
+
/* If no fast import and the trustdb is dirty (i.e. we added a key
or userID that had something other than a selfsig, a signature
that was other than a selfsig, or any revocation), then
update/check the trustdb if the user specified by setting
interactive or by not setting no-auto-check-trustdb */
- if (!(options&IMPORT_FAST) && trustdb_pending_check())
- {
- if (opt.interactive)
- update_trustdb();
- else if (!opt.no_auto_check_trustdb)
- check_trustdb();
- }
+
+ if(!(options&IMPORT_FAST))
+ trustdb_check_or_update();
return rc;
}