aboutsummaryrefslogtreecommitdiffstats
path: root/agent/query.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2002-04-24 23:18:53 +0000
committerMarcus Brinkmann <[email protected]>2002-04-24 23:18:53 +0000
commitb4f8fcb0e11a5079783b6a95d7c9a80b49d886b9 (patch)
treed8ca7d236377df0b8afd10cfee0716a5e90b6208 /agent/query.c
parent2002-04-25 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-b4f8fcb0e11a5079783b6a95d7c9a80b49d886b9.tar.gz
gnupg-b4f8fcb0e11a5079783b6a95d7c9a80b49d886b9.zip
2002-04-25 Marcus Brinkmann <[email protected]>
* agent.h (agent_get_confirmation): Replace paramter prompt with two parameters ok and cancel. * query.c (agent_get_confirmation): Likewise. Implement this. * trustlist.c (agent_marktrusted): Fix invocation of agent_get_confirmation. * divert-scd.c (ask_for_card): Likewise.
Diffstat (limited to 'agent/query.c')
-rw-r--r--agent/query.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/agent/query.c b/agent/query.c
index 4243f0026..c7e05a099 100644
--- a/agent/query.c
+++ b/agent/query.c
@@ -353,7 +353,7 @@ agent_get_passphrase (char **retpass, const char *desc, const char *prompt,
confirmed it, GNUPG_Not_Confirmed for what the text says or an
other error. */
int
-agent_get_confirmation (const char *desc, const char *prompt)
+agent_get_confirmation (const char *desc, const char *ok, const char *cancel)
{
int rc;
char line[ASSUAN_LINELENGTH];
@@ -371,9 +371,17 @@ agent_get_confirmation (const char *desc, const char *prompt)
if (rc)
return map_assuan_err (rc);
- if (prompt)
+ if (ok)
{
- snprintf (line, DIM(line)-1, "SETPROMPT %s", prompt);
+ snprintf (line, DIM(line)-1, "SETOK %s", ok);
+ line[DIM(line)-1] = 0;
+ rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
+ if (rc)
+ return map_assuan_err (rc);
+ }
+ if (cancel)
+ {
+ snprintf (line, DIM(line)-1, "SETCANCEL %s", cancel);
line[DIM(line)-1] = 0;
rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (rc)