aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/keyedit.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 3ffe66fce..cb5fb4f1c 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-10 Werner Koch <[email protected]>
+
+ * keyedit.c (keyedit_menu) [W32]: Run the trustdb stale check
+ earlier.
+
2005-03-07 Werner Koch <[email protected]>
* cardglue.c (agent_scd_pkdecrypt, agent_scd_pksign)
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 46759ef82..8cd85d43b 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -1431,7 +1431,20 @@ keyedit_menu( const char *username, STRLIST locusr,
goto leave;
}
- /* get the public key */
+#ifdef HAVE_W32_SYSTEM
+ /* Due to Windows peculiarities we need to make sure that the
+ trustdb stale check is done before we open another file
+ (i.e. by searching for a key). In theory we could make sure
+ that the files are closed after use but the open/close caches
+ inhibits that and flushing the cache right before the stale
+ check is not easy to implement. Thus we take the easy way out
+ and run the stale check as early as possible. Note, that for
+ non- W32 platforms it is run indirectly trough a call to
+ get_validity (). */
+ check_trustdb_stale ();
+#endif
+
+ /* Get the public key */
rc = get_pubkey_byname (NULL, username, &keyblock, &kdbhd, 1);
if( rc )
goto leave;