1TPMLIB_GetInfo(3) TPMLIB_GetInfo(3)
2
3
4
6 TPMLIB_GetInfo - Get Information about the TPM implementation
7
9 TPM library (libtpms, -ltpms)
10
12 #include <libtpms/tpm_library.h>
13
14 char *TPMLIB_GetInfo(TPMLIB_InfoFlags flags);
15
17 The TPMLIB_GetInfo() function allows to query for TPM implementation
18 specifics and get a JSON string in return. Which data is to be returned
19 can be specified in the flags parameter that may be a logical 'or'
20 concatenation of flags. If passed flags are not supported, nothing is
21 returned . If a 0 is passed in, an empty JSON Object '{}' is returned.
22
23 The following flags are defined and return JSON objects as shown:
24
25 TPMLIB_INFO_TPMSPECIFICATION
26 {"TPMSpecification":{"family":"1.2","level":2,"revision":116}}
27
28 TPMLIB_INFO_TPMATTRIBUTES
29 {"TPMAttributes":{"manufacturer":"id:00001014","version":"id:00740001","model":"swtpm"}}
30
32 This function returns a JSON string on success and a NULL pointer if a
33 memory allocation failure occurred.
34
35 The caller must free() the returned string.
36
38libtpms 2018-05-04 TPMLIB_GetInfo(3)