mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
Add the INQUIRE_MAXLEN status message.
This status message is used to inform the client of the maximum length of an inquired passphrase and is used in pinentry-mode=loopback. * agent/command.c (pinentry_loopback): Send the INQUIRE_MAXLEN status message before doing the inquire.
This commit is contained in:
parent
4402dc3f0a
commit
ae981dd8f4
@ -2791,6 +2791,12 @@ pinentry_loopback(ctrl_t ctrl, const char *keyword,
|
||||
{
|
||||
gpg_error_t rc;
|
||||
assuan_context_t ctx = ctrl->server_local->assuan_ctx;
|
||||
char buf[50];
|
||||
|
||||
snprintf (buf, sizeof (buf), "%u", max_length);
|
||||
rc = assuan_write_status (ctx, "INQUIRE_MAXLEN", buf);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
assuan_begin_confidential (ctx);
|
||||
rc = assuan_inquire (ctx, keyword, buffer, size, max_length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user