.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TPMLIB_GetInfo 3" .TH TPMLIB_GetInfo 3 2024-03-09 libtpms "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME TPMLIB_GetInfo \- Get Information about the TPM implementation .SH LIBRARY .IX Header "LIBRARY" TPM library (libtpms, \-ltpms) .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fB#include .PP \&\fBchar *TPMLIB_GetInfo(TPMLIB_InfoFlags flags);\fR .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBTPMLIB_GetInfo()\fR 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. .PP The following flags are defined and return JSON objects as shown: .IP \fBTPMLIB_INFO_TPMSPECIFICATION\fR 4 .IX Item "TPMLIB_INFO_TPMSPECIFICATION" {"TPMSpecification":{"family":"1.2","level":2,"revision":116}} .IP \fBTPMLIB_INFO_TPMATTRIBUTES\fR 4 .IX Item "TPMLIB_INFO_TPMATTRIBUTES" {"TPMAttributes":{"manufacturer":"id:00001014","version":"id:00740001","model":"swtpm"}} .IP "\fBTPMLIB_INFO_TPMFEATURES\fR (since v0.8.0)" 4 .IX Item "TPMLIB_INFO_TPMFEATURES (since v0.8.0)" {"TPMFeatures":{"RSAKeySizes":[1024,2048,3072]}} .Sp This JSON object may be extended in the future. .SH "RETURN VALUE" .IX Header "RETURN VALUE" This function returns a JSON string on success and a NULL pointer if a memory allocation failure occurred. .PP The caller must \fBfree()\fR the returned string. .SH "SEE ALSO" .IX Header "SEE ALSO"