mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-10 04:51:39 +00:00

To do this mount all ESP partitions and check all the binaries there to see if they match any entries in the new dbx. If we applied the update when a hash matched, we would unintentially 'brick' the users machine, as the grub and shim binaries *have* to be updated first. This functionality does reimplement the PE hashing functionality found in sbsigntools and pesign. This was done for 4 main reasons: * There were some memory safety issues found when fuzzing random binaries * Executing the tools hundreds of times was a lot of overhead * Operating from a blob of immutable mmap'd memory is much faster * We only need a very small amount of functionality from both tools
17 lines
400 B
C
17 lines
400 B
C
/*
|
|
* Copyright (C) 2020 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <gio/gio.h>
|
|
|
|
#define FU_TYPE_EFI_IMAGE (fu_efi_image_get_type ())
|
|
G_DECLARE_FINAL_TYPE (FuEfiImage, fu_efi_image, FU, EFI_IMAGE, GObject)
|
|
|
|
FuEfiImage *fu_efi_image_new (GBytes *data,
|
|
GError **error);
|
|
const gchar *fu_efi_image_get_checksum (FuEfiImage *self);
|