mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01: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
@ -1,3 +1,8 @@
|
|||||||
|
2011-09-12 Ben Kibbey <bjk@luxsci.net>
|
||||||
|
|
||||||
|
* genkey.c (agent_ask_new_passphrase): Allow for an empty passphrase
|
||||||
|
(no protection) in PINENTRY_MODE_LOOPBACK.
|
||||||
|
|
||||||
2011-09-10 Ben Kibbey <bjk@luxsci.net>
|
2011-09-10 Ben Kibbey <bjk@luxsci.net>
|
||||||
|
|
||||||
* agent.h (pinentry_loopback): New prototype.
|
* agent.h (pinentry_loopback): New prototype.
|
||||||
|
@ -313,8 +313,13 @@ agent_ask_new_passphrase (ctrl_t ctrl, const char *prompt,
|
|||||||
err = pinentry_loopback(ctrl, "NEW_PASSPHRASE", &buffer, &size, len);
|
err = pinentry_loopback(ctrl, "NEW_PASSPHRASE", &buffer, &size, len);
|
||||||
if (!err)
|
if (!err)
|
||||||
{
|
{
|
||||||
buffer[size] = 0;
|
if (size)
|
||||||
*r_passphrase = buffer;
|
{
|
||||||
|
buffer[size] = 0;
|
||||||
|
*r_passphrase = buffer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*r_passphrase = NULL;
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user