diff options
| author | Werner Koch <[email protected]> | 2018-03-27 06:48:00 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-03-27 06:48:00 +0000 |
| commit | d4dc4245bf0221d2db4118718fc2528ecf43b97b (patch) | |
| tree | 5912abc9b9ba056a882bcd933105ba4dde73c560 /agent/findkey.c | |
| parent | Change license of argparse.c back to LGPLv2.1 (diff) | |
| parent | agent: Make the request origin a part of the cache items. (diff) | |
| download | gnupg-d4dc4245bf0221d2db4118718fc2528ecf43b97b.tar.gz gnupg-d4dc4245bf0221d2db4118718fc2528ecf43b97b.zip | |
Merge branch 'STABLE-BRANCH-2-2' into master
Diffstat (limited to 'agent/findkey.c')
| -rw-r--r-- | agent/findkey.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/findkey.c b/agent/findkey.c index e3e9a123f..78c3b1a47 100644 --- a/agent/findkey.c +++ b/agent/findkey.c @@ -511,7 +511,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, { char *pw; - pw = agent_get_cache (cache_nonce, CACHE_MODE_NONCE); + pw = agent_get_cache (ctrl, cache_nonce, CACHE_MODE_NONCE); if (pw) { rc = agent_unprotect (ctrl, *keybuf, pw, NULL, &result, &resultlen); @@ -536,7 +536,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, char *pw; retry: - pw = agent_get_cache (hexgrip, cache_mode); + pw = agent_get_cache (ctrl, hexgrip, cache_mode); if (pw) { rc = agent_unprotect (ctrl, *keybuf, pw, NULL, &result, &resultlen); @@ -574,7 +574,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, We can often avoid the passphrase entry in the second step. We do this only in normal mode, so not to interfere with unrelated cache entries. */ - pw = agent_get_cache (NULL, cache_mode); + pw = agent_get_cache (ctrl, NULL, cache_mode); if (pw) { rc = agent_unprotect (ctrl, *keybuf, pw, NULL, @@ -670,7 +670,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text, else { /* Passphrase is fine. */ - agent_put_cache (hexgrip, cache_mode, pi->pin, + agent_put_cache (ctrl, hexgrip, cache_mode, pi->pin, lookup_ttl? lookup_ttl (hexgrip) : 0); agent_store_cache_hit (hexgrip); if (r_passphrase && *pi->pin) |
