aboutsummaryrefslogtreecommitdiffstats
path: root/agent/cvt-openpgp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-09-02 10:46:23 +0000
committerWerner Koch <[email protected]>2010-09-02 10:46:23 +0000
commit90a4599c5ee0b6f8740d8b537013e68839112217 (patch)
treeb320fb2244bf1e150a9308d531f0cd5db2ffdf16 /agent/cvt-openpgp.c
parentEven less prompts for a new key now. (diff)
downloadgnupg-90a4599c5ee0b6f8740d8b537013e68839112217.tar.gz
gnupg-90a4599c5ee0b6f8740d8b537013e68839112217.zip
Obscure the cached passphrases.
Diffstat (limited to 'agent/cvt-openpgp.c')
-rw-r--r--agent/cvt-openpgp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c
index a1678ea16..fee93e27d 100644
--- a/agent/cvt-openpgp.c
+++ b/agent/cvt-openpgp.c
@@ -766,16 +766,14 @@ convert_openpgp (ctrl_t ctrl, gcry_sexp_t s_pgp,
err = gpg_error (GPG_ERR_BAD_PASSPHRASE);
if (cache_nonce)
{
- void *cache_marker = NULL;
- const char *cache_value;
+ char *cache_value;
- cache_value = agent_get_cache (cache_nonce, CACHE_MODE_NONCE,
- &cache_marker);
+ cache_value = agent_get_cache (cache_nonce, CACHE_MODE_NONCE);
if (cache_value)
{
if (strlen (cache_value) < pi->max_length)
strcpy (pi->pin, cache_value);
- agent_unlock_cache_entry (&cache_marker);
+ xfree (cache_value);
}
if (*pi->pin)
err = try_do_unprotect_cb (pi);