summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_image_loader.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-08-27 18:51:32 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-09-06 22:21:41 +0300
commit0f7878b853bdc363a930381c42b709b7d24066b5 (patch)
tree874b51148934b06ebbe5e66375d18f38fe1f1937 /lib/efi_loader/efi_image_loader.c
parent24586059d3818d812300c77257c5134ddd7e2935 (diff)
downloadu-boot-0f7878b853bdc363a930381c42b709b7d24066b5.tar.xz
efi_loader: error message if image not authenticated
Currently if the bootefi command fails due to missing authentication, the user gets no feedback. Write a log message 'Image not authenticated' if LoadImage() fails due to missing authentication. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_image_loader.c')
-rw-r--r--lib/efi_loader/efi_image_loader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index da50fc31f1..94f76ef6b8 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -762,10 +762,12 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle,
}
/* Authenticate an image */
- if (efi_image_authenticate(efi, efi_size))
+ if (efi_image_authenticate(efi, efi_size)) {
handle->auth_status = EFI_IMAGE_AUTH_PASSED;
- else
+ } else {
handle->auth_status = EFI_IMAGE_AUTH_FAILED;
+ log_err("Image not authenticated\n");
+ }
/* Calculate upper virtual address boundary */
for (i = num_sections - 1; i >= 0; i--) {