aboutsummaryrefslogtreecommitdiffstats
path: root/agent/trustlist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-10-16 17:36:44 +0000
committerWerner Koch <[email protected]>2006-10-16 17:36:44 +0000
commit416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7 (patch)
tree36d85761aa1f07807a5f738de608d3ed33531605 /agent/trustlist.c
parentFixed aegypten bug 299 (diff)
downloadgnupg-416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7.tar.gz
gnupg-416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7.zip
Allow to cancel marktrusted.
Diffstat (limited to 'agent/trustlist.c')
-rw-r--r--agent/trustlist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/agent/trustlist.c b/agent/trustlist.c
index 1f0427b65..51e655a06 100644
--- a/agent/trustlist.c
+++ b/agent/trustlist.c
@@ -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