1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2021-08-24 10:39:59 +09:00
parent 87d238de3d
commit 3ed5f566fc

View File

@ -589,8 +589,8 @@ proc_encrypted (CTX c, PACKET *pkt)
struct pubkey_enc_list *list; struct pubkey_enc_list *list;
for (list = c->pkenc_list; list; list = list->next) 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]; char buf[20];
snprintf (buf, sizeof buf, "%08lX%08lX", snprintf (buf, sizeof buf, "%08lX%08lX",
(ulong)list->keyid[0], (ulong)list->keyid[1]); (ulong)list->keyid[0], (ulong)list->keyid[1]);