aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyring.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-01-20 16:09:38 +0000
committerDavid Shaw <[email protected]>2004-01-20 16:09:38 +0000
commit0fb284ac24a010e6029f01494f44ab907bb5e79b (patch)
tree0e883c0e947e7a8509ce7c37f776f5259abb2fa0 /g10/keyring.c
parent* sig-check.c (check_key_signature2): Comments. (diff)
downloadgnupg-0fb284ac24a010e6029f01494f44ab907bb5e79b.tar.gz
gnupg-0fb284ac24a010e6029f01494f44ab907bb5e79b.zip
* g10.c (main), keydb.h, keydb.c (keydb_rebuild_caches), keyring.h,
keyring.c (keyring_rebuild_cache): Add "noisy" flag so cache rebuilds can remain noisy when called for itself, and quiet when called as part of the trustdb rebuild. * trustdb.c (validate_keys): Rebuild the sig caches before building the trustdb. Note that this is going to require some architectual re-thinking, as it is agonizingly slow.
Diffstat (limited to 'g10/keyring.c')
-rw-r--r--g10/keyring.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index bf879df32..093bb0074 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1310,7 +1310,7 @@ write_keyblock (IOBUF fp, KBNODE keyblock)
* This is only done for the public keyrings.
*/
int
-keyring_rebuild_cache (void *token)
+keyring_rebuild_cache (void *token,int noisy)
{
KEYRING_HANDLE hd;
KEYDB_SEARCH_DESC desc;
@@ -1356,8 +1356,8 @@ keyring_rebuild_cache (void *token)
if (rc)
goto leave;
lastresname = resname;
- if (!opt.quiet)
- log_info (_("checking keyring `%s'\n"), resname);
+ if (noisy && !opt.quiet)
+ log_info (_("caching keyring `%s'\n"), resname);
rc = create_tmp_file (resname, &bakfilename, &tmpfilename, &tmpfp);
if (rc)
goto leave;
@@ -1402,8 +1402,8 @@ keyring_rebuild_cache (void *token)
if (rc)
goto leave;
- if ( !(++count % 50) && !opt.quiet)
- log_info(_("%lu keys checked so far (%lu signatures)\n"),
+ if ( !(++count % 50) && noisy && !opt.quiet)
+ log_info(_("%lu keys cached so far (%lu signatures)\n"),
count, sigcount );
} /* end main loop */
@@ -1414,7 +1414,8 @@ keyring_rebuild_cache (void *token)
log_error ("keyring_search failed: %s\n", g10_errstr(rc));
goto leave;
}
- log_info(_("%lu keys checked (%lu signatures)\n"), count, sigcount );
+ if(noisy || opt.verbose)
+ log_info(_("%lu keys cached (%lu signatures)\n"), count, sigcount );
if (tmpfp)
{
if (iobuf_close (tmpfp))