1 | =head1 NAME
|
---|
2 |
|
---|
3 | TPMLIB_GetInfo - Get Information about the TPM implementation
|
---|
4 |
|
---|
5 | =head1 LIBRARY
|
---|
6 |
|
---|
7 | TPM library (libtpms, -ltpms)
|
---|
8 |
|
---|
9 | =head1 SYNOPSIS
|
---|
10 |
|
---|
11 | B<#include <libtpms/tpm_library.h>>
|
---|
12 |
|
---|
13 | B<char *TPMLIB_GetInfo(TPMLIB_InfoFlags flags);>
|
---|
14 |
|
---|
15 | =head1 DESCRIPTION
|
---|
16 |
|
---|
17 | The B<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' concatenation
|
---|
20 | of flags. If passed flags are not supported, nothing is returned . If a 0 is
|
---|
21 | passed in, an empty JSON Object '{}' is returned.
|
---|
22 |
|
---|
23 | The following flags are defined and return JSON objects as shown:
|
---|
24 |
|
---|
25 | =over 4
|
---|
26 |
|
---|
27 | =item B<TPMLIB_INFO_TPMSPECIFICATION>
|
---|
28 |
|
---|
29 | {"TPMSpecification":{"family":"1.2","level":2,"revision":116}}
|
---|
30 |
|
---|
31 | =item B<TPMLIB_INFO_TPMATTRIBUTES>
|
---|
32 |
|
---|
33 | {"TPMAttributes":{"manufacturer":"id:00001014","version":"id:00740001","model":"swtpm"}}
|
---|
34 |
|
---|
35 | =item B<TPMLIB_INFO_TPMFEATURES> (since v0.8.0)
|
---|
36 |
|
---|
37 | {"TPMFeatures":{"RSAKeySizes":[1024,2048,3072]}}
|
---|
38 |
|
---|
39 | This JSON object may be extended in the future.
|
---|
40 |
|
---|
41 | =back
|
---|
42 |
|
---|
43 | =head1 RETURN VALUE
|
---|
44 |
|
---|
45 | This function returns a JSON string on success and a NULL pointer if a memory
|
---|
46 | allocation failure occurred.
|
---|
47 |
|
---|
48 | The caller must free() the returned string.
|
---|
49 |
|
---|
50 | =head1 SEE ALSO
|
---|
51 |
|
---|
52 | =cut
|
---|