diff options
author | Werner Koch <[email protected]> | 2004-04-26 08:09:25 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-04-26 08:09:25 +0000 |
commit | 6aaceac7fec0b98b60ab1259bda5f97465817ce6 (patch) | |
tree | da7228afd0a40e47f7ca15ca4bacd2594979601a /sm/keydb.c | |
parent | (oidtranstbl): New. OIDs collected from several sources. (diff) | |
download | gnupg-6aaceac7fec0b98b60ab1259bda5f97465817ce6.tar.gz gnupg-6aaceac7fec0b98b60ab1259bda5f97465817ce6.zip |
The keybox gets now compressed after 3 hours and ephemeral
stored certificates are deleted after about a day.
Diffstat (limited to 'sm/keydb.c')
-rw-r--r-- | sm/keydb.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sm/keydb.c b/sm/keydb.c index 858baf242..322307553 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -218,10 +218,25 @@ keydb_add_resource (const char *url, int force, int secret) = create_dotlock (filename); if (!all_resources[used_resources].lockhandle) log_fatal ( _("can't create lock for `%s'\n"), filename); + + /* Do a compress run if needed and the file is not locked. */ + if (!make_dotlock (all_resources[used_resources].lockhandle, 0)) + { + KEYBOX_HANDLE kbxhd = keybox_new (token, secret); + + if (kbxhd) + { + keybox_compress (kbxhd); + keybox_release (kbxhd); + } + release_dotlock (all_resources[used_resources].lockhandle); + } used_resources++; } } + + break; default: log_error ("resource type of `%s' not supported\n", url); |