mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
agent: simplify agent_get_passphrase.
* agent/call-pinentry.c (agent_get_passphrase): Simplify.
This commit is contained in:
parent
818fa4f71e
commit
5a12c45666
@ -1064,15 +1064,9 @@ agent_get_passphrase (ctrl_t ctrl,
|
|||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
size_t len = ASSUAN_LINELENGTH/2;
|
size_t len = ASSUAN_LINELENGTH/2;
|
||||||
unsigned char *buffer;
|
|
||||||
|
|
||||||
rc = pinentry_loopback(ctrl, "PASSPHRASE", &buffer, &size, len);
|
return pinentry_loopback (ctrl, "PASSPHRASE",
|
||||||
if (!rc)
|
(unsigned char **)retpass, &size, len);
|
||||||
{
|
|
||||||
buffer[size] = 0;
|
|
||||||
*retpass = buffer;
|
|
||||||
}
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
return gpg_error (GPG_ERR_NO_PIN_ENTRY);
|
return gpg_error (GPG_ERR_NO_PIN_ENTRY);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user