mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Allow no protection in pinentry-mode=loopback.
When the inquired passphrase has a 0 length then treat it as no protection.
This commit is contained in:
parent
eb5709f554
commit
0dcf517700
2 changed files with 12 additions and 2 deletions
|
@ -313,8 +313,13 @@ agent_ask_new_passphrase (ctrl_t ctrl, const char *prompt,
|
|||
err = pinentry_loopback(ctrl, "NEW_PASSPHRASE", &buffer, &size, len);
|
||||
if (!err)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*r_passphrase = buffer;
|
||||
if (size)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*r_passphrase = buffer;
|
||||
}
|
||||
else
|
||||
*r_passphrase = NULL;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue