From d8a49bbcd1b1d40ab0ddadac0dbb16a5d75c626e Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 6 Aug 2019 11:12:07 +0900 Subject: [PATCH] gpg: Don't report NO_SECKEY for valid key. * g10/mainproc.c (proc_encrypted): Report status of STATUS_NO_SECKEY only when some error occurred. -- Fixes-commit: 6cc4119ec03be61c78189a0bec99372035289b91 Signed-off-by: NIIBE Yutaka --- g10/mainproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/mainproc.c b/g10/mainproc.c index e98d1f89c..5b43b378a 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -584,7 +584,7 @@ proc_encrypted (CTX c, PACKET *pkt) struct pubkey_enc_list *list; for (list = c->pkenc_list; list; list = list->next) - if (list->result != -1) + if (list->result && list->result != -1) { char buf[20]; snprintf (buf, sizeof buf, "%08lX%08lX",