summaryrefslogtreecommitdiffstats
path: root/man/man3/TPMLIB_GetInfo.pod
blob: 650b62b5bb442fdb59ddc8a574b6e5ef001b492b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
=head1 NAME

TPMLIB_GetInfo    - Get Information about the TPM implementation

=head1 LIBRARY

TPM library (libtpms, -ltpms)

=head1 SYNOPSIS

B<#include <libtpms/tpm_library.h>>

B<char *TPMLIB_GetInfo(TPMLIB_InfoFlags flags);>

=head1 DESCRIPTION

The B<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:

=over 4

=item B<TPMLIB_INFO_TPMSPECIFICATION>

{"TPMSpecification":{"family":"1.2","level":2,"revision":116}}

=item B<TPMLIB_INFO_TPMATTRIBUTES>

{"TPMAttributes":{"manufacturer":"id:00001014","version":"id:00740001","model":"swtpm"}}

=item B<TPMLIB_INFO_TPMFEATURES> (since v0.8.0)

{"TPMFeatures":{"RSAKeySizes":[1024,2048,3072]}}

This JSON object may be extended in the future.

=back

=head1 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.

=head1 SEE ALSO

=cut