mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-29 16:38:47 +00:00

Some devices do not have a stable PCR0 for the same firmware version, and I'd like to collect the TPM event log for affected machines to debug why.
35 lines
803 B
C
35 lines
803 B
C
/*
|
|
* Copyright (C) 2019 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "fu-plugin.h"
|
|
|
|
#include "fu-tpm-eventlog-common.h"
|
|
|
|
typedef struct {
|
|
guint8 pcr;
|
|
FuTpmEventlogItemKind kind;
|
|
gchar *checksum_sha1;
|
|
gchar *checksum_sha256;
|
|
GBytes *blob;
|
|
} FuTpmEventlogItem;
|
|
|
|
typedef enum {
|
|
FU_TPM_EVENTLOG_PARSER_FLAG_NONE = 0,
|
|
FU_TPM_EVENTLOG_PARSER_FLAG_ALL_PCRS = 1 << 0,
|
|
FU_TPM_EVENTLOG_PARSER_FLAG_ALL_ALGS = 1 << 1,
|
|
FU_TPM_EVENTLOG_PARSER_FLAG_LAST
|
|
} FuTpmEventlogParserFlags;
|
|
|
|
GPtrArray *fu_tpm_eventlog_parser_new (const guint8 *buf,
|
|
gsize bufsz,
|
|
FuTpmEventlogParserFlags flags,
|
|
GError **error);
|
|
void fu_tpm_eventlog_item_to_string (FuTpmEventlogItem *item,
|
|
guint idt,
|
|
GString *str);
|