logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TPMLIB_GetInfo - Get Information about the TPM implementation

Description

The TPMLIB_GetInfo() function allows a user 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: TPMLIB_INFO_TPMSPECIFICATION {"TPMSpecification":{"family":"1.2","level":2,"revision":116}} TPMLIB_INFO_TPMATTRIBUTES {"TPMAttributes":{"manufacturer":"id:00001014", "version":"id:00740001","model":"swtpm"}} TPMLIB_INFO_TPMFEATURES (since v0.8.0) {"TPMFeatures":{"RSAKeySizes":[1024,2048,3072]}} This JSON object may be extended in the future.

Library

TPM library (libtpms, -ltpms)

Name

TPMLIB_GetInfo - Get Information about the TPM implementation

Return Value

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.

See Also

libtpms 2025-06-25 TPMLIB_GetInfo(3)

Synopsis

#include<libtpms/tpm_library.h> char*TPMLIB_GetInfo(TPMLIB_InfoFlagsflags);

See Also