1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

2002-04-25 Marcus Brinkmann <marcus@g10code.de>

* 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.
This commit is contained in:
Marcus Brinkmann 2002-04-24 23:18:53 +00:00
parent b107b6d795
commit b4f8fcb0e1
5 changed files with 25 additions and 7 deletions

View file

@ -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)