1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

Fix pinentry loopback and passphrase contraints.

* agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
pinentry loopback mode.
* agent/genkey.c (check_passphrase_constraints): Immediately return when
pinentry mode is loopback.

--
Fixes endless loop when inquiring a passphrase with
pinentry-mode=loopback that may not satisfy passphrase contraints.
This commit is contained in:
Ben Kibbey 2015-08-16 13:46:59 -04:00
parent 93f5295df5
commit bba74cdd95
2 changed files with 6 additions and 0 deletions

View File

@ -1541,6 +1541,9 @@ cmd_get_passphrase (assuan_context_t ctx, char *line)
{ {
char *response2; char *response2;
if (ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
break;
rc = agent_get_passphrase (ctrl, &response2, desc2, prompt, rc = agent_get_passphrase (ctrl, &response2, desc2, prompt,
errtext, 0, errtext, 0,
cacheid, CACHE_MODE_USER); cacheid, CACHE_MODE_USER);

View File

@ -189,6 +189,9 @@ check_passphrase_constraints (ctrl_t ctrl, const char *pw,
char *msg2 = NULL; char *msg2 = NULL;
char *msg3 = NULL; char *msg3 = NULL;
if (ctrl && ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
return 0;
if (!pw) if (!pw)
pw = ""; pw = "";