From e201c20f25e7bed29088186c5f717d43047a0f4b Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 19 May 2015 14:58:04 +0200 Subject: agent: Modify agent_clear_passphrase to support an ext. password cache. * agent/agent.h (agent_get_passphrase): Add arguments keyinfo and cache_mode. Update callers. * agent/call-pinentry.c (agent_get_passphrase): Add arguments keyinfo and cache_mode. If KEYINFO and CACHE_MODE describe a cachable key, then send SETKEYINFO to the pinentry. -- Signed-off-by: Neal H. Walfield --- agent/command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'agent/command.c') diff --git a/agent/command.c b/agent/command.c index 3188bbd0e..8ed9a0f76 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1519,7 +1519,7 @@ cmd_get_passphrase (assuan_context_t ctx, char *line) next_try: rc = agent_get_passphrase (ctrl, &response, desc, prompt, repeat_errtext? repeat_errtext:errtext, - opt_qualbar); + opt_qualbar, cacheid, CACHE_MODE_USER); xfree (repeat_errtext); repeat_errtext = NULL; if (!rc) @@ -1536,7 +1536,8 @@ cmd_get_passphrase (assuan_context_t ctx, char *line) char *response2; rc = agent_get_passphrase (ctrl, &response2, desc2, prompt, - errtext, 0); + errtext, 0, + cacheid, CACHE_MODE_USER); if (rc) break; if (strcmp (response2, response)) -- cgit