diff options
author | Werner Koch <[email protected]> | 2020-07-13 12:30:14 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-07-13 12:30:43 +0000 |
commit | d9ea47f702840c87431df984b9b3f7e60c9ea815 (patch) | |
tree | dd258a984e42330821d66470df00100e7bc0f7a3 | |
parent | dirmngr: Handle EAFNOSUPPORT at connect_server. (diff) | |
download | gnupg-d9ea47f702840c87431df984b9b3f7e60c9ea815.tar.gz gnupg-d9ea47f702840c87431df984b9b3f7e60c9ea815.zip |
agent: Fix regression with --newsymkey in loopback mode.
* agent/command.c (cmd_get_passphrase): Never repeat in loopback mode;
same as with !OPT_NEWSYMKEY.
--
In loopback mode there shall not be any repeat because the caller is
expected to do any confirmation before passing a new passphrase to
gpg.
Fixes-commit: d9e2dfa4c585de7c261fde13c18bd0f82415d6c3
as unfortunately released with 2.2.21.
GnuPG-bug-id: 4991
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | agent/command.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/command.c b/agent/command.c index ebbb42cb7..34852151e 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1595,11 +1595,14 @@ cmd_get_passphrase (assuan_context_t ctx, char *line) pi2->failed_tries = 0; continue; } - if (*pi->pin && !pi->repeat_okay) + if (*pi->pin && !pi->repeat_okay + && ctrl->pinentry_mode != PINENTRY_MODE_LOOPBACK) { /* The passphrase is empty and the pinentry did not * already run the repetition check, do it here. This - * is only called when using an old and simple pinentry. */ + * is only called when using an old and simple pinentry. + * It is neither called in loopback mode because the + * caller does any passphrase repetition by herself. */ xfree (response); response = NULL; rc = agent_get_passphrase (ctrl, &response, |