From 416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 16 Oct 2006 17:36:44 +0000 Subject: Allow to cancel marktrusted. --- agent/trustlist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'agent/trustlist.c') 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 -- cgit v1.2.3