mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +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>
|
||||
|
||||
* 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);
|
||||
if (!err)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*r_passphrase = buffer;
|
||||
if (size)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*r_passphrase = buffer;
|
||||
}
|
||||
else
|
||||
*r_passphrase = NULL;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user