From 02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 27 Mar 2018 08:40:58 +0200 Subject: agent: Make the request origin a part of the cache items. * agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all callers to pass it. (agent_get_cache): Ditto. * agent/cache.c (struct cache_items_s): Add field 'restricted'. (housekeeping): Adjust debug output. (agent_flush_cache): Ditto. (agent_put_cache): Ditto. Take RESTRICTED into account. (agent_get_cache): Ditto. -- If requests are coming from different sources they should not share the same cache. This way we make sure that a Pinentry pops up for a remote request to a key we have already used locally. GnuPG-bug-id: 3858 Signed-off-by: Werner Koch --- agent/cvt-openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'agent/cvt-openpgp.c') diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c index ee1222113..bf05174fa 100644 --- a/agent/cvt-openpgp.c +++ b/agent/cvt-openpgp.c @@ -951,7 +951,7 @@ convert_from_openpgp_main (ctrl_t ctrl, gcry_sexp_t s_pgp, int dontcare_exist, { char *cache_value; - cache_value = agent_get_cache (cache_nonce, CACHE_MODE_NONCE); + cache_value = agent_get_cache (ctrl, cache_nonce, CACHE_MODE_NONCE); if (cache_value) { if (strlen (cache_value) < pi->max_length) -- cgit v1.2.3