Provides internal fapi functions for the handling of event logs
◆ ifapi_cleanup_event()
Free allocated memory for an ifapi event.
- Parameters
-
[in,out] | event | The structure to be cleaned up. |
◆ ifapi_eventlog_append_check()
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()
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. |
◆ ifapi_eventlog_get_finish()
Retrieve the eventlog for a given list of pcrs using asynchronous io.
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. |
[out] | log | The event log for the requested PCRs in JSON format |
- 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_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
◆ ifapi_eventlog_initialize()
TSS2_RC ifapi_eventlog_initialize |
( |
IFAPI_EVENTLOG * |
eventlog, |
|
|
const char * |
log_dir |
|
) |
| |
Initialize the eventlog module of FAPI.
- Parameters
-
[in,out] | eventlog | The context area for the eventlog. |
[in] | log_dir | The directory where to put the eventlog data. |
- 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_REFERENCE | a invalid null pointer is passed. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |