mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
The keybox gets now compressed after 3 hours and ephemeral
stored certificates are deleted after about a day.
This commit is contained in:
parent
cbc5ce3ea4
commit
6aaceac7fe
14 changed files with 413 additions and 57 deletions
15
sm/keydb.c
15
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue