diff options
| author | NIIBE Yutaka <[email protected]> | 2026-03-10 02:13:46 +0100 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2026-03-10 02:13:46 +0100 |
| commit | 53c8f29125ff9664120879b78fb11a6e766f89f4 (patch) | |
| tree | 8f87ad2e58de76fdeb338e241b768d0ef3160ac7 /src/passphrase.c | |
| parent | Don't cap ISO dates beyond year 2037 on Windows (diff) | |
| download | gpgme-53c8f29125ff9664120879b78fb11a6e766f89f4.tar.gz gpgme-53c8f29125ff9664120879b78fb11a6e766f89f4.zip | |
Handle the case when pinentry is invoked multiple times.
* src/passphrase.c (_gpgme_passphrase_status_handler): Reset
no_passphrase and bad_passphrase field.
--
GnuPG-bug-id: 7339
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/passphrase.c')
| -rw-r--r-- | src/passphrase.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passphrase.c b/src/passphrase.c index 140cd03a..d07afa91 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -114,6 +114,11 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code, case GPGME_STATUS_CANCELED_BY_USER: return gpg_error (GPG_ERR_CANCELED); + case GPGME_STATUS_PINENTRY_LAUNCHED: + /* Another pinentry is invoked, reset the passphrase status. */ + opd->no_passphrase = opd->bad_passphrase = 0; + break; + case GPGME_STATUS_EOF: if (opd->no_passphrase || opd->bad_passphrase) return gpg_error (GPG_ERR_BAD_PASSPHRASE); |
