1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-13 00:09:51 +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

@ -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> 2006-10-06 Werner Koch <wk@g10code.com>
* Makefile.am (AM_CFLAGS): Use PTH version of libassuan. * Makefile.am (AM_CFLAGS): Use PTH version of libassuan.

View File

@ -582,6 +582,9 @@ agent_get_confirmation (ctrl_t ctrl,
} }
rc = assuan_transact (entry_ctx, "CONFIRM", NULL, NULL, NULL, NULL, NULL, NULL); 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); return unlock_pinentry (rc);
} }

View File

@ -1170,7 +1170,7 @@ get_passphrase (int promptno)
char *pw; char *pw;
int err; int err;
const char *desc; const char *desc;
#ifdef HAVE_LANGINFO_CODESET #ifdef ENABLE_NLS
char *orig_codeset = NULL; char *orig_codeset = NULL;
#endif #endif
int error_msgno; int error_msgno;

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. */ button is "the default "Cancel" of the Pinentry. */
err = agent_get_confirmation (ctrl, desc, _("Correct"), NULL); err = agent_get_confirmation (ctrl, desc, _("Correct"), NULL);
free (desc); 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) 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, if (asprintf (&desc,
/* TRANSLATORS: This prompt is shown by the Pinentry /* TRANSLATORS: This prompt is shown by the Pinentry