Event log utilities.
Feature API » Internals of Feature API

## 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] | event | The 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] | eventlog | The context area for the eventlog.
  [in,out] | io | The context area for the asynchronous io module.

Return values

  TSS2_RC_SUCCESS | on success.
  TSS2_FAPI_RC_IO_ERROR | if creation of log_dir failed or log_dir is not writable.
  TSS2_FAPI_RC_MEMORY | if memory allocation failed.
  TSS2_FAPI_RC_TRY_AGAIN | if the I/O operation is not finished yet and this function needs to be called again.
  TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function.
  TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred.
  TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending.
  TSS2_FAPI_RC_BAD_REFERENCE | a 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] | eventlog | The context area for the eventlog.
  [in,out] | io | The context area for the asynchronous io module.
  [in] | pcr_event | The event to be appended to the eventlog.

Return values

  TSS2_RC_SUCCESS | on success.
  TSS2_FAPI_RC_IO_ERROR | if creation of log_dir failed or log_dir is not writable.
  TSS2_FAPI_RC_MEMORY | if memory allocation failed.
  TSS2_FAPI_RC_TRY_AGAIN | if the I/O operation is not finished yet and this function needs to be called again.
  TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function.
  TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred.
  TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending.
  TSS2_FAPI_RC_BAD_REFERENCE | a 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] | eventlog | The context area for the eventlog.
  [in,out] | io | The context area for the asynchronous io module.
  [in] | pcrList | The list of PCR indices to retrieve the log for.
  [in] | pcrListSize | The size of pcrList.

Return values

  TSS2_RC_SUCCESS | on success.
  TSS2_FAPI_RC_IO_ERROR | if creation of log_dir failed or log_dir is not writable.
  TSS2_FAPI_RC_MEMORY | if memory allocation failed.
  TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function.
  TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed.