summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/shim.c b/shim.c
index 32b6a30f..083ea9e8 100644
--- a/shim.c
+++ b/shim.c
@@ -1488,7 +1488,8 @@ load_revocations_file(EFI_HANDLE image_handle, CHAR16 *FileName, CHAR16 *PathNam
}
EFI_STATUS
-load_cert_file(EFI_HANDLE image_handle, CHAR16 *filename, CHAR16 *PathName)
+load_cert_file(EFI_HANDLE image_handle, CHAR16 *filename, CHAR16 *PathName,
+ int flags)
{
EFI_STATUS efi_status;
PE_COFF_LOADER_IMAGE_CONTEXT context;
@@ -1502,8 +1503,7 @@ load_cert_file(EFI_HANDLE image_handle, CHAR16 *filename, CHAR16 *PathName)
int i;
efi_status = read_image(image_handle, filename, &PathName,
- &data, &datasize,
- SUPPRESS_NETBOOT_OPEN_FAILURE_NOISE);
+ &data, &datasize, flags);
if (EFI_ERROR(efi_status))
return efi_status;
@@ -1565,6 +1565,7 @@ load_unbundled_trust(EFI_HANDLE image_handle)
EFI_STATUS efi_status;
EFI_LOADED_IMAGE *li = NULL;
CHAR16 *PathName = NULL;
+ static CHAR16 FileName[] = L"shim_certificate_0.efi";
EFI_FILE *root, *dir;
EFI_FILE_INFO *info;
EFI_HANDLE device;
@@ -1572,6 +1573,7 @@ load_unbundled_trust(EFI_HANDLE image_handle)
UINTN buffersize = 0;
void *buffer = NULL;
BOOLEAN search_revocations = TRUE;
+ int i = 0;
efi_status = gBS->HandleProtocol(image_handle, &EFI_LOADED_IMAGE_GUID,
(void **)&li);
@@ -1598,6 +1600,11 @@ load_unbundled_trust(EFI_HANDLE image_handle)
*/
load_revocations_file(image_handle, SKUSIREVOCATIONFILE, PathName);
load_revocations_file(image_handle, SBATREVOCATIONFILE, PathName);
+ while (load_cert_file(image_handle, FileName, PathName,
+ SUPPRESS_NETBOOT_OPEN_FAILURE_NOISE) == EFI_SUCCESS
+ && i++ < 10) {
+ FileName[17]++;
+ }
goto done;
}