diff options
author | Werner Koch <[email protected]> | 2010-09-02 10:46:23 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-09-02 10:46:23 +0000 |
commit | 90a4599c5ee0b6f8740d8b537013e68839112217 (patch) | |
tree | b320fb2244bf1e150a9308d531f0cd5db2ffdf16 /agent/cvt-openpgp.c | |
parent | Even less prompts for a new key now. (diff) | |
download | gnupg-90a4599c5ee0b6f8740d8b537013e68839112217.tar.gz gnupg-90a4599c5ee0b6f8740d8b537013e68839112217.zip |
Obscure the cached passphrases.
Diffstat (limited to 'agent/cvt-openpgp.c')
-rw-r--r-- | agent/cvt-openpgp.c | 8 |
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); |