From b209c17be9a42ce25cdaddc1e949577f18f07c6a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 23 May 2002 09:07:45 +0000 Subject: * no-pth.c, Makefile.am: Removed. * call-scd.c: Seirialized all scdaeom access when using Pth. * cache.c: Made the cache Pth-thread-safe. (agent_unlock_cache_entry): New. * findkey.c (unprotect): Unlock the returned cache value. * command.c (cmd_get_passphrase): Ditto. * gpg-agent.c (main): Register pth_read/write with Assuan. --- agent/findkey.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'agent/findkey.c') diff --git a/agent/findkey.c b/agent/findkey.c index 662a56f89..1a222ba77 100644 --- a/agent/findkey.c +++ b/agent/findkey.c @@ -106,10 +106,12 @@ unprotect (unsigned char **keybuf, const unsigned char *grip) /* first try to get it from the cache - if there is none or we can't unprotect it, we fall back to ask the user */ { - const char *pw = agent_get_cache (hexgrip); + void *cache_marker; + const char *pw = agent_get_cache (hexgrip, &cache_marker); if (pw) { rc = agent_unprotect (*keybuf, pw, &result, &resultlen); + agent_unlock_cache_entry (&cache_marker); if (!rc) { xfree (*keybuf); -- cgit v1.2.3