TPMLIB_GetInfo(3) TPMLIB_GetInfo(3)

TPMLIB_GetInfo - Get Information about the TPM implementation

TPM library (libtpms, -ltpms)

#include <libtpms/tpm_library.h>

char *TPMLIB_GetInfo(TPMLIB_InfoFlags flags);

The TPMLIB_GetInfo() function allows to query for TPM implementation specifics and get a JSON string in return. Which data is to be returned can be specified in the flags parameter that may be a logical 'or' concatenation of flags. If passed flags are not supported, nothing is returned . If a 0 is passed in, an empty JSON Object '{}' is returned.

The following flags are defined and return JSON objects as shown:


This JSON object may be extended in the future.

This function returns a JSON string on success and a NULL pointer if a memory allocation failure occurred.

The caller must free() the returned string.

2023-05-07 libtpms