diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-26 07:15:10 -0800 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-02-26 07:15:10 -0800 |
commit | cf6e37d0690ed36d090bdc915ba090aa3e795145 (patch) | |
tree | 8b206ef86dc30f52b1835ad80b51dfd2dbcd57e3 | |
parent | 491059569251cb86c3ea8d62ada0331b8c274725 (diff) | |
download | efitools-cf6e37d0690ed36d090bdc915ba090aa3e795145.tar.gz |
shim_protocol: add implementation of read_header
Apparently the grub chainloader does use this for some reason (in the
SUSE patched version)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | lib/shim_protocol.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/shim_protocol.c b/lib/shim_protocol.c index 602ef8e..530d097 100644 --- a/lib/shim_protocol.c +++ b/lib/shim_protocol.c @@ -40,7 +40,13 @@ static EFI_SIGNATURE_LIST **to_cert_list(VOID *data, UINTN len) return retval; } -static EFI_STATUS shimprotocol_verify (void *buffer, UINT32 size) +static EFI_STATUS shimprotocol_context(void *data, unsigned int size, + PE_COFF_LOADER_IMAGE_CONTEXT *context) +{ + return pecoff_read_header(context, data); +} + +static EFI_STATUS shimprotocol_verify(void *buffer, UINT32 size) { EFI_STATUS status; PE_COFF_LOADER_IMAGE_CONTEXT context; @@ -99,6 +105,7 @@ static EFI_STATUS shimprotocol_verify (void *buffer, UINT32 size) static SHIM_LOCK shim_protocol_interface = { .Verify = shimprotocol_verify, + .Context = shimprotocol_context, }; static EFI_HANDLE shim_protocol_handle; |