mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
eb68c2d3d1
commit
02dce8c0cc
8 changed files with 51 additions and 43 deletions
|
@ -3140,7 +3140,7 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t *spec,
|
|||
goto out;
|
||||
|
||||
/* Cache this passphrase. */
|
||||
err = agent_put_cache (key_grip, CACHE_MODE_SSH, pi->pin, ttl);
|
||||
err = agent_put_cache (ctrl, key_grip, CACHE_MODE_SSH, pi->pin, ttl);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue