aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Kibbey <bjk@luxsci.net>2020-11-04 21:51:06 -0800
committerBen Kibbey <bjk@luxsci.net>2020-11-05 11:19:15 -0800
commit31e47dfad0f40e31e8b3113b933696e8e4105136 (patch)
tree9f370c597f6f38680b95bdc4332208b305d95dce
parentf808012ac2cf67ec563da178d963f300a7f2564d (diff)
downloadgnupg-31e47dfad0f40e31e8b3113b933696e8e4105136.tar.gz
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 <bjk@luxsci.net>
-rw-r--r--common/status.h1
-rw-r--r--g10/passphrase.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/common/status.h b/common/status.h
index 477b29eaa..0c481d247 100644
--- a/common/status.h
+++ b/common/status.h
@@ -37,6 +37,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 fe41ae034..50bb0e18d 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -359,7 +359,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;
}
}