mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-31 11:41:32 +01:00
agent: Try to SETREPEATOK if the pinentry supports it.
* agent/call-pinentry.c (agent_get_passphrase): Do SETREPEATOK. (agent_askpin): Ditto. Signed-off-by: Ben Kibbey <bjk@luxsci.net>
This commit is contained in:
parent
b52a0e244a
commit
be77a7ab8a
@ -1543,6 +1543,17 @@ agent_askpin (ctrl_t ctrl,
|
|||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
pininfo->with_repeat = 0; /* Pinentry does not support it. */
|
pininfo->with_repeat = 0; /* Pinentry does not support it. */
|
||||||
|
|
||||||
|
if (pininfo->with_repeat)
|
||||||
|
{
|
||||||
|
snprintf (line, DIM(line), "SETREPEATOK %s",
|
||||||
|
L_("Passphrases match."));
|
||||||
|
rc = assuan_transact (entry_ctx, line,
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
if (rc)
|
||||||
|
rc = 0; /* Pinentry does not support it. */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
pininfo->repeat_okay = 0;
|
pininfo->repeat_okay = 0;
|
||||||
pininfo->status = 0;
|
pininfo->status = 0;
|
||||||
@ -1802,6 +1813,16 @@ agent_get_passphrase (ctrl_t ctrl,
|
|||||||
if (rc)
|
if (rc)
|
||||||
pininfo->with_repeat = 0; /* Pinentry does not support it. */
|
pininfo->with_repeat = 0; /* Pinentry does not support it. */
|
||||||
|
|
||||||
|
if (pininfo->with_repeat)
|
||||||
|
{
|
||||||
|
snprintf (line, DIM(line), "SETREPEATOK %s",
|
||||||
|
L_("Passphrases match."));
|
||||||
|
rc = assuan_transact (entry_ctx, line,
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
if (rc)
|
||||||
|
rc = 0; /* Pinentry does not support it. */
|
||||||
|
}
|
||||||
|
|
||||||
(void)setup_genpin (ctrl);
|
(void)setup_genpin (ctrl);
|
||||||
|
|
||||||
rc = setup_enforced_constraints (ctrl);
|
rc = setup_enforced_constraints (ctrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user