aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2021-08-24 01:39:59 +0000
committerNIIBE Yutaka <[email protected]>2021-08-24 01:39:59 +0000
commit3ed5f566fc057975d0158bb637c72bd118aba7f8 (patch)
tree43fad87eb7e9443ea4370deb8488df04bd1f242e /g10/mainproc.c
parentwkd: Properly unescape the user-id from a key listing. (diff)
downloadgnupg-3ed5f566fc057975d0158bb637c72bd118aba7f8.tar.gz
gnupg-3ed5f566fc057975d0158bb637c72bd118aba7f8.zip
gpg: Report the status of NO_SECKEY for decryption.
* g10/mainproc.c (proc_encrypted): Fix the condition to report NO_SECKEY even when the key was not considered by get_session_key. -- GnuPG-bug-id: 5562 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/mainproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 821378ee6..1ee5b9a6e 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -589,8 +589,8 @@ proc_encrypted (CTX c, PACKET *pkt)
struct pubkey_enc_list *list;
for (list = c->pkenc_list; list; list = list->next)
- if (list->result && list->result != -1)
- {
+ if (list->result)
+ { /* Key was not tried or it caused an error. */
char buf[20];
snprintf (buf, sizeof buf, "%08lX%08lX",
(ulong)list->keyid[0], (ulong)list->keyid[1]);