1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-25 01:42:45 +02:00

(public_key_list): Do a trustdb staleness check before

opening the keyring.
(secret_key_list): Ditto.
This commit is contained in:
Werner Koch 2005-01-18 09:51:58 +00:00
parent 8220c9e799
commit 79161ef7b9
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-01-18 Werner Koch <wk@g10code.com>
* keylist.c (public_key_list): Do a trustdb staleness check before
opening the keyring.
(secret_key_list): Ditto.
2005-01-10 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (keyedit_menu): Move command strings outside the

View File

@ -95,6 +95,13 @@ public_key_list( STRLIST list )
printf("\n");
}
/* We need to do the stale check right here because it might need to
update the keyring while we already have the keyring open. This
is very bad for W32 because of a sharing violation. For real OSes
it might lead to false results if we are later listing a keyring
which is associated with the inode of a deleted file. */
check_trustdb_stale ();
if( !list )
list_all(0);
else
@ -104,6 +111,8 @@ public_key_list( STRLIST list )
void
secret_key_list( STRLIST list )
{
check_trustdb_stale ();
if( !list )
list_all(1);
else /* List by user id */