tpm2-tss  master
TPM Software stack 2.0 TCG spec compliant implementation
Event log utilities.

Functions

void ifapi_cleanup_event (IFAPI_EVENT *event)
 
TSS2_RC ifapi_eventlog_append_check (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io)
 
TSS2_RC ifapi_eventlog_append_finish (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const IFAPI_EVENT *pcr_event)
 
TSS2_RC ifapi_eventlog_get_async (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const TPM2_HANDLE *pcrList, size_t pcrListSize)
 

Detailed Description

Provides internal fapi functions for the handling of event logs

Function Documentation

◆ ifapi_cleanup_event()

void ifapi_cleanup_event ( IFAPI_EVENT event)

Free allocated memory for an ifapi event.

Parameters
[in,out]eventThe structure to be cleaned up.

◆ ifapi_eventlog_append_check()

TSS2_RC ifapi_eventlog_append_check ( IFAPI_EVENTLOG eventlog,
IFAPI_IO io 
)

Check event log format before appending an event to the existing event log.

Call after ifapi_eventlog_get_async.

Parameters
[in,out]eventlogThe context area for the eventlog.
[in,out]ioThe context area for the asynchronous io module.
Return values
TSS2_RC_SUCCESSon success.
TSS2_FAPI_RC_IO_ERRORif creation of log_dir failed or log_dir is not writable.
TSS2_FAPI_RC_MEMORYif memory allocation failed.
TSS2_FAPI_RC_TRY_AGAINif the I/O operation is not finished yet and this function needs to be called again.
TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.
TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.
TSS2_FAPI_RC_BAD_REFERENCEa invalid null pointer is passed.

◆ ifapi_eventlog_append_finish()

TSS2_RC ifapi_eventlog_append_finish ( IFAPI_EVENTLOG eventlog,
IFAPI_IO io,
const IFAPI_EVENT pcr_event 
)

Append an event to the existing event log.

Call after ifapi_eventlog_get_async.

Parameters
[in,out]eventlogThe context area for the eventlog.
[in,out]ioThe context area for the asynchronous io module.
[in]pcr_eventThe event to be appended to the eventlog.
Return values
TSS2_RC_SUCCESSon success.
TSS2_FAPI_RC_IO_ERRORif creation of log_dir failed or log_dir is not writable.
TSS2_FAPI_RC_MEMORYif memory allocation failed.
TSS2_FAPI_RC_TRY_AGAINif the I/O operation is not finished yet and this function needs to be called again.
TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.
TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.
TSS2_FAPI_RC_BAD_REFERENCEa invalid null pointer is passed.

◆ ifapi_eventlog_get_async()

TSS2_RC ifapi_eventlog_get_async ( IFAPI_EVENTLOG eventlog,
IFAPI_IO io,
const TPM2_HANDLE *  pcrList,
size_t  pcrListSize 
)

Retrieve the eventlog for a given list of pcrs using asynchronous io.

Call ifapi_eventlog_get_finish to retrieve the results.

Parameters
[in,out]eventlogThe context area for the eventlog.
[in,out]ioThe context area for the asynchronous io module.
[in]pcrListThe list of PCR indices to retrieve the log for.
[in]pcrListSizeThe size of pcrList.
Return values
TSS2_RC_SUCCESSon success.
TSS2_FAPI_RC_IO_ERRORif creation of log_dir failed or log_dir is not writable.
TSS2_FAPI_RC_MEMORYif memory allocation failed.
TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.
TSS2_FAPI_RC_BAD_REFERENCEa invalid null pointer is passed.