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
31 TPMLIB_INFO_TPMFEATURES (since v0.8.0)
32 {"TPMFeatures":{"RSAKeySizes":[1024,2048,3072]}}
33
34 This JSON object may be extended in the future.
35
37 This function returns a JSON string on success and a NULL pointer if a
38 memory allocation failure occurred.
39
40 The caller must free() the returned string.
41
43libtpms 2022-07-01 TPMLIB_GetInfo(3)