public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] efi_loader: capsule: add a debug message in case of no key
@ 2021-05-10  8:19 AKASHI Takahiro
  2021-05-20  2:06 ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: AKASHI Takahiro @ 2021-05-10  8:19 UTC (permalink / raw)
  To: u-boot

It will probably be a common error case that a certificate (public key)
is not provided by the system while capsule authentication is enabled.
So add a debug message.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 lib/efi_loader/efi_capsule.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 90893f85e22c..84ddaf50d13f 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -316,8 +316,10 @@ efi_status_t efi_capsule_authenticate(const void *capsule, efi_uintn_t capsule_s
 	}
 
 	ret = efi_get_public_key_data(&fdt_pkey, &pkey_len);
-	if (ret < 0)
+	if (ret < 0) {
+		debug("Public key/certificate not found\n");
 		goto out;
+	}
 
 	pkey = malloc(pkey_len);
 	if (!pkey)
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-20  7:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-10  8:19 [PATCH] efi_loader: capsule: add a debug message in case of no key AKASHI Takahiro
2021-05-20  2:06 ` Heinrich Schuchardt
2021-07-20  2:13   ` AKASHI Takahiro
2021-07-20  6:39     ` Ilias Apalodimas
2021-07-20  6:48       ` AKASHI Takahiro
2021-07-20  7:18         ` Ilias Apalodimas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox