1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Allow to cancel marktrusted.

This commit is contained in:
Werner Koch 2006-10-16 17:36:44 +00:00
parent d7160c2e34
commit 416ac2e4d7
4 changed files with 21 additions and 2 deletions

View file

@ -479,8 +479,14 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag)
button is "the default "Cancel" of the Pinentry. */
err = agent_get_confirmation (ctrl, desc, _("Correct"), NULL);
free (desc);
/* If the user did not confirmed this, we return cancel here so that
gpgsm may stop asking further questions. We won't do this for
the second question of course. */
if (err)
return err;
return (gpg_err_code (err) == GPG_ERR_NOT_CONFIRMED ?
gpg_err_make (gpg_err_source (err), GPG_ERR_CANCELED) : err);
if (asprintf (&desc,
/* TRANSLATORS: This prompt is shown by the Pinentry