mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01: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:
parent
b107b6d795
commit
b4f8fcb0e1
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2002-04-24 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* agent.h (struct opt): Add members display, ttyname, ttytype,
|
||||
|
@ -119,7 +119,8 @@ int agent_askpin (const char *desc_text, const char *err_text,
|
||||
int agent_get_passphrase (char **retpass,
|
||||
const char *desc, const char *prompt,
|
||||
const char *errtext);
|
||||
int agent_get_confirmation (const char *desc, const char *prompt);
|
||||
int agent_get_confirmation (const char *desc, const char *ok,
|
||||
const char *cancel);
|
||||
|
||||
/*-- cache.c --*/
|
||||
int agent_put_cache (const char *key, const char *data, int ttl);
|
||||
|
@ -119,7 +119,7 @@ ask_for_card (const unsigned char *shadow_info, char **r_kid)
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = agent_get_confirmation (desc, NULL);
|
||||
rc = agent_get_confirmation (desc, NULL, NULL);
|
||||
free (desc);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -254,7 +254,7 @@ agent_marktrusted (const char *name, const char *fpr, int flag)
|
||||
"has the fingerprint:%%0A"
|
||||
" %s", name, fpr) < 0 )
|
||||
return GNUPG_Out_Of_Core;
|
||||
rc = agent_get_confirmation (desc, "Correct|No");
|
||||
rc = agent_get_confirmation (desc, "Correct", "No");
|
||||
free (desc);
|
||||
if (rc)
|
||||
return rc;
|
||||
@ -265,7 +265,7 @@ agent_marktrusted (const char *name, const char *fpr, int flag)
|
||||
"to correctly certify user certificates?",
|
||||
name) < 0 )
|
||||
return GNUPG_Out_Of_Core;
|
||||
rc = agent_get_confirmation (desc, "Yes|No");
|
||||
rc = agent_get_confirmation (desc, "Yes", "No");
|
||||
free (desc);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user