mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-19 15:48:57 +00:00

This allows us to 'nest' firmware formats, and removes a ton of duplication. The aim here is to deprecate FuFirmwareImage -- it's almost always acting as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow custom types. If I'm struggling to work out what should be a FuFirmware and what should be a FuFirmwareImage then a plugin author has no hope. For simple payloads we were adding bytes into an image and then the image into a firmware. This gets really messy when most plugins are treating the FuFirmware *as* the binary firmware file. The GBytes saved in the FuFirmware would be considered the payload with the aim of not using FuFirmwareImage in the single-image case.
33 lines
1018 B
C
33 lines
1018 B
C
/*
|
|
* Copyright (C) 2020 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <gio/gio.h>
|
|
|
|
#include "fu-firmware.h"
|
|
|
|
#define FU_TYPE_EFI_SIGNATURE (fu_efi_signature_get_type ())
|
|
G_DECLARE_FINAL_TYPE (FuEfiSignature, fu_efi_signature, FU, EFI_SIGNATURE, FuFirmware)
|
|
|
|
typedef enum {
|
|
FU_EFI_SIGNATURE_KIND_UNKNOWN,
|
|
FU_EFI_SIGNATURE_KIND_SHA256,
|
|
FU_EFI_SIGNATURE_KIND_X509,
|
|
/*< private >*/
|
|
FU_EFI_SIGNATURE_KIND_LAST
|
|
} FuEfiSignatureKind;
|
|
|
|
#define FU_EFI_SIGNATURE_GUID_ZERO "00000000-0000-0000-0000-000000000000"
|
|
#define FU_EFI_SIGNATURE_GUID_MICROSOFT "77fa9abd-0359-4d32-bd60-28f4e78f784b"
|
|
#define FU_EFI_SIGNATURE_GUID_OVMF "a0baa8a3-041d-48a8-bc87-c36d121b5e3d"
|
|
#define FU_EFI_SIGNATURE_GUID_OVMF_LEGACY "d5c1df0b-1bac-4edf-ba48-08834009ca5a"
|
|
|
|
const gchar *fu_efi_signature_kind_to_string (FuEfiSignatureKind kind);
|
|
|
|
FuEfiSignatureKind fu_efi_signature_get_kind (FuEfiSignature *self);
|
|
const gchar *fu_efi_signature_get_owner (FuEfiSignature *self);
|