mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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.
--
Cherry-picked from master commit of:
02a2633a7f
Debian-bug-id: 919856
GnuPG-bug-id: 4348
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
7f4c3eb0a0
commit
9109bb9919
3 changed files with 39 additions and 21 deletions
|
@ -265,6 +265,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
|
||||
{
|
||||
|
@ -274,7 +282,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