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;
94 enum IFAPI_EVENTLOG_STATE {
95 IFAPI_EVENTLOG_STATE_INIT = 0,
96 IFAPI_EVENTLOG_STATE_READING,
97 IFAPI_EVENTLOG_STATE_APPENDING,
98 IFAPI_EVENTLOG_STATE_WRITING
102 enum IFAPI_EVENTLOG_STATE state;
104 const char *firmware_log_file;
105 const char *ima_log_file;
107 TPM2_HANDLE pcrList[TPM2_MAX_PCRS];
114 ifapi_eventlog_initialize(
117 const char *firmware_log_file,
118 const char *ima_log_file);
124 const TPM2_HANDLE *pcrList,
128 ifapi_eventlog_get_finish(
TSS2_RC ifapi_eventlog_append_finish(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const IFAPI_EVENT *event)
Definition: ifapi_eventlog.c:414
void ifapi_cleanup_event(IFAPI_EVENT *event)
Definition: ifapi_eventlog.c:502
TSS2_RC ifapi_eventlog_append_check(IFAPI_EVENTLOG *eventlog, IFAPI_IO *io)
Definition: ifapi_eventlog.c:342
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:89
TPMT_SIG_SCHEME sig_scheme
Definition: ifapi_eventlog.h:90
TPMS_ATTEST attest
Definition: ifapi_eventlog.h:91
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:101
Definition: ifapi_eventlog_system.h:41
Definition: ifapi_ima_eventlog.h:50
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