6 #ifndef IFAPI_EVENTLOG_H
7 #define IFAPI_EVENTLOG_H
9 #include <json-c/json.h>
11 #include "tss2_tpm2_types.h"
13 #include "efi_event.h"
14 #include "ifapi_ima_eventlog.h"
15 #include "ifapi_eventlog_system.h"
17 #define CONTENT_TYPE "content_type"
18 #define CONTENT "content"
22 typedef UINT32 IFAPI_EVENT_TYPE;
23 #define IFAPI_TSS_EVENT_TAG 2
24 #define IFAPI_IMA_EVENT_TAG 3
25 #define IFAPI_IMA_NG_EVENT_TAG 4
26 #define IFAPI_IMA_SIG_EVENT_TAG 5
27 #define IFAPI_PC_CLIENT 6
28 #define IFAPI_CEL_TAG 8
31 typedef UINT32 TPMI_CELMGTTYPE;
33 #define FIRMWARE_END 2
34 #define CEL_TIMESTAMP 80
35 #define STATE_TRANS 81
48 TPMS_EMPTY firmware_end;
87 enum IFAPI_EVENTLOG_STATE {
88 IFAPI_EVENTLOG_STATE_INIT = 0,
89 IFAPI_EVENTLOG_STATE_READING,
90 IFAPI_EVENTLOG_STATE_APPENDING,
91 IFAPI_EVENTLOG_STATE_WRITING
95 enum IFAPI_EVENTLOG_STATE state;
97 const char *firmware_log_file;
98 const char *ima_log_file;
100 TPM2_HANDLE pcrList[TPM2_MAX_PCRS];
107 ifapi_eventlog_initialize(
110 const char *firmware_log_file,
111 const char *ima_log_file);
117 const TPM2_HANDLE *pcrList,
TSS2_RC ifapi_eventlog_get_finish(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, char **log)
Definition: ifapi_eventlog.c:201
TSS2_RC ifapi_eventlog_append_finish(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const IFAPI_EVENT *event)
Definition: ifapi_eventlog.c:397
void ifapi_cleanup_event(IFAPI_EVENT *event)
Definition: ifapi_eventlog.c:483
TSS2_RC ifapi_eventlog_append_check(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io)
Definition: ifapi_eventlog.c:327
TSS2_RC ifapi_eventlog_get_async(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const TPM2_HANDLE *pcrList, size_t pcrListSize)
Definition: ifapi_eventlog.c:78
Definition: ifapi_eventlog.h:77
TPML_DIGEST_VALUES digests
Definition: ifapi_eventlog.h:80
IFAPI_EVENT_TYPE content_type
Definition: ifapi_eventlog.h:81
UINT32 recnum
Definition: ifapi_eventlog.h:78
IFAPI_EVENT_UNION content
Definition: ifapi_eventlog.h:82
bool verify
Definition: ifapi_eventlog.h:83
TPM2_HANDLE pcr
Definition: ifapi_eventlog.h:79
Definition: ifapi_eventlog.h:94
Definition: ifapi_eventlog_system.h:51
Definition: ifapi_ima_eventlog.h:45
Definition: ifapi_io.h:15
Definition: ifapi_eventlog.h:60
TPM2B_EVENT data
Definition: ifapi_eventlog.h:61
char * event
Definition: ifapi_eventlog.h:62
Definition: ifapi_eventlog.h:40
Definition: ifapi_eventlog.h:53
Definition: ifapi_eventlog.h:67
IFAPI_IMA_EVENT ima_event
Definition: ifapi_eventlog.h:69
IFAPI_FIRMWARE_EVENT firmware_event
Definition: ifapi_eventlog.h:70
IFAPI_TSS_EVENT tss_event
Definition: ifapi_eventlog.h:68
TPMS_EVENT_CELMGT cel_event
Definition: ifapi_eventlog.h:71
Definition: ifapi_eventlog.h:46