mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +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 len = ASSUAN_LINELENGTH/2;
|
||||
unsigned char *buffer;
|
||||
|
||||
rc = pinentry_loopback(ctrl, "PASSPHRASE", &buffer, &size, len);
|
||||
if (!rc)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*retpass = buffer;
|
||||
}
|
||||
return rc;
|
||||
return pinentry_loopback (ctrl, "PASSPHRASE",
|
||||
(unsigned char **)retpass, &size, len);
|
||||
}
|
||||
return gpg_error (GPG_ERR_NO_PIN_ENTRY);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user