diff options
author | Ben Kibbey <[email protected]> | 2020-11-05 05:51:06 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-11-09 10:53:33 +0000 |
commit | f05d1772c47b71cf77f79519b8edbc682002d303 (patch) | |
tree | 4279f560d1e74767619bceabc072653ac57067be | |
parent | gpg: Do not print rejected digest algo notes with --quiet. (diff) | |
download | gnupg-f05d1772c47b71cf77f79519b8edbc682002d303.tar.gz gnupg-f05d1772c47b71cf77f79519b8edbc682002d303.zip |
gpg: Add canceled status message.
* common/status.h (STATUS_CANCELED_BY_USER): New.
* g10/passphrase.c (passphrase_to_dek): Send STATUS_CANCELED_BY_USER
instead of STATUS_MISSING_PASSPHRASE when canceled is set.
--
This is to prevent further pinentry tries when the pinentry is canceled
by the user during symmetric decryption.
Signed-off-by: Ben Kibbey <[email protected]>
(cherry picked from commit 31e47dfad0f40e31e8b3113b933696e8e4105136)
-rw-r--r-- | common/status.h | 1 | ||||
-rw-r--r-- | g10/passphrase.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/common/status.h b/common/status.h index dc62f3629..d5564e468 100644 --- a/common/status.h +++ b/common/status.h @@ -35,6 +35,7 @@ enum STATUS_ENTER, STATUS_LEAVE, STATUS_ABORT, + STATUS_CANCELED_BY_USER, STATUS_GOODSIG, STATUS_BADSIG, diff --git a/g10/passphrase.c b/g10/passphrase.c index df80af84a..e6837e369 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -409,7 +409,7 @@ passphrase_to_dek (int cipher_algo, STRING2KEY *s2k, if (*canceled) { xfree (pw); - write_status( STATUS_MISSING_PASSPHRASE ); + write_status( STATUS_CANCELED_BY_USER ); return NULL; } } |