diff options
author | Werner Koch <wk@gnupg.org> | 2006-10-16 19:36:44 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2006-10-16 19:36:44 +0200 |
commit | 416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7 (patch) | |
tree | 36d85761aa1f07807a5f738de608d3ed33531605 /agent | |
parent | Fixed aegypten bug 299 (diff) | |
download | gnupg2-416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7.tar.xz gnupg2-416ac2e4d720befa18f1f39b9a0a59f6cbaf87f7.zip |
Allow to cancel marktrusted.
Diffstat (limited to 'agent')
-rw-r--r-- | agent/ChangeLog | 10 | ||||
-rw-r--r-- | agent/call-pinentry.c | 3 | ||||
-rw-r--r-- | agent/protect-tool.c | 2 | ||||
-rw-r--r-- | agent/trustlist.c | 8 |
4 files changed, 21 insertions, 2 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index e255674fd..228d19542 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,13 @@ +2006-10-16 Werner Koch <wk@g10code.com> + + * call-pinentry.c (agent_get_confirmation): Map Cancel code here too. + * trustlist.c (agent_marktrusted): Return Cancel instead of + Not_Confirmed for the first question. + +2006-10-12 Werner Koch <wk@g10code.com> + + * protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET. + 2006-10-06 Werner Koch <wk@g10code.com> * Makefile.am (AM_CFLAGS): Use PTH version of libassuan. diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index e6b4c6a60..cf0112833 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -582,6 +582,9 @@ agent_get_confirmation (ctrl_t ctrl, } rc = assuan_transact (entry_ctx, "CONFIRM", NULL, NULL, NULL, NULL, NULL, NULL); + if (rc && gpg_err_source (rc) && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED) + rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_CANCELED); + return unlock_pinentry (rc); } diff --git a/agent/protect-tool.c b/agent/protect-tool.c index bb14ca1e1..23f1d9336 100644 --- a/agent/protect-tool.c +++ b/agent/protect-tool.c @@ -1170,7 +1170,7 @@ get_passphrase (int promptno) char *pw; int err; const char *desc; -#ifdef HAVE_LANGINFO_CODESET +#ifdef ENABLE_NLS char *orig_codeset = NULL; #endif int error_msgno; 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 |