mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Clear bogus pinentry cache, when it causes an error.
* agent/agent.h (PINENTRY_STATUS_*): Expose to public. (struct pin_entry_info_s): Add status. * agent/call-pinentry.c (agent_askpin): Clearing the ->status before the loop, let the assuan_transact set ->status. When failure with PINENTRY_STATUS_PASSWORD_FROM_CACHE, it returns soon. * agent/findkey.c (unprotect): Clear the pinentry cache, when it causes an error. -- GnuPG-bug-id: 4348 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
1c92510045
commit
02a2633a7f
3 changed files with 39 additions and 21 deletions
|
@ -266,6 +266,14 @@ struct server_control_s
|
|||
};
|
||||
|
||||
|
||||
/* Status of pinentry. */
|
||||
enum
|
||||
{
|
||||
PINENTRY_STATUS_CLOSE_BUTTON = 1 << 0,
|
||||
PINENTRY_STATUS_PIN_REPEATED = 1 << 8,
|
||||
PINENTRY_STATUS_PASSWORD_FROM_CACHE = 1 << 9
|
||||
};
|
||||
|
||||
/* Information pertaining to pinentry requests. */
|
||||
struct pin_entry_info_s
|
||||
{
|
||||
|
@ -275,7 +283,8 @@ struct pin_entry_info_s
|
|||
int failed_tries; /* Number of tries so far failed. */
|
||||
int with_qualitybar; /* Set if the quality bar should be displayed. */
|
||||
int with_repeat; /* Request repetition of the passphrase. */
|
||||
int repeat_okay; /* Repetition worked. */
|
||||
int repeat_okay; /* Repetition worked. */
|
||||
unsigned int status; /* Status. */
|
||||
gpg_error_t (*check_cb)(struct pin_entry_info_s *); /* CB used to check
|
||||
the PIN */
|
||||
void *check_cb_arg; /* optional argument which might be of use in the CB */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue