From 3ed5f566fc057975d0158bb637c72bd118aba7f8 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 24 Aug 2021 10:39:59 +0900 Subject: 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 --- g10/mainproc.c | 4 ++-- 1 file 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]); -- cgit v1.2.3