123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- .TH "ESYS_CONTEXT" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- ESYS_CONTEXT
- .SH SYNOPSIS
- .br
- .PP
- .SS "Typedefs"
- .in +1c
- .ti -1c
- .RI "typedef struct \fBESYS_CONTEXT\fP \fBESYS_CONTEXT\fP"
- .br
- .in -1c
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "TSS2_RC \fBEsys_Initialize\fP (\fBESYS_CONTEXT\fP **esys_context, TSS2_TCTI_CONTEXT *tcti, TSS2_ABI_VERSION *abiVersion)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBEsys_GetTcti\fP (\fBESYS_CONTEXT\fP *esys_context, TSS2_TCTI_CONTEXT **tcti)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBEsys_GetPollHandles\fP (\fBESYS_CONTEXT\fP *esys_context, TSS2_TCTI_POLL_HANDLE **handles, size_t *count)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBEsys_SetTimeout\fP (\fBESYS_CONTEXT\fP *esys_context, int32_t timeout)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBEsys_GetSysContext\fP (\fBESYS_CONTEXT\fP *esys_context, TSS2_SYS_CONTEXT **sys_context)"
- .br
- .ti -1c
- .RI "void \fBEsys_Free\fP (void *__ptr)"
- .br
- .in -1c
- .SH "Detailed Description"
- .PP
- An \fBESYS_CONTEXT\fP holds tdata for the connection to the TPM as well as the metadata for TPM Resource; such as Transient key, Persistent objects, NV spaces, Sessions or PCRs\&.
- .SH "Typedef Documentation"
- .PP
- .SS "\fBESYS_CONTEXT\fP"
- Reference to the \fBESYS_CONTEXT\fP that holds data for the connection to the TPM as well as the metadata for TPM Resource; such as Transient key, Persistent objects, NV spaces, Sessions or PCRs\&.
- .SH "Function Documentation"
- .PP
- .SS "TSS2_RC Esys_GetPollHandles (\fBESYS_CONTEXT\fP * esys_context, TSS2_TCTI_POLL_HANDLE ** handles, size_t * count)"
- Return the poll handles of the used TCTI\&.
- .PP
- The connection to the TPM is held using a TCTI\&. These may optionally provide handles that can be used to poll for incoming data\&. This is useful when using the asynchronous function of ESAPI in an event-loop model\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIesys_context\fP [in] The \fBESYS_CONTEXT\fP\&.
- .br
- \fIhandles\fP [out] The poll handles (callee-allocated, use free())
- .br
- \fIcount\fP [out] The number of poll handles\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on Success\&.
- .br
- \fITSS2_ESYS_RC_BAD_REFERENCE\fP if esysContext, handles or count is NULL\&.
- .br
- \fITSS2_RCs\fP produced by lower layers of the software stack\&.
- .RE
- .PP
- .SS "TSS2_RC Esys_GetSysContext (\fBESYS_CONTEXT\fP * esys_context, TSS2_SYS_CONTEXT ** sys_context)"
- Helper function that returns sys contest from the give esys context\&.
- .PP
- Function returns sys contest from the give esys context\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIesys_context\fP [in] ESYS context\&.
- .br
- \fIsys_context\fP [out] SYS context\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on Success\&.
- .br
- \fITSS2_ESYS_RC_BAD_REFERENCE\fP if esys_context of sys_context are NULL\&.
- .RE
- .PP
- .SS "TSS2_RC Esys_GetTcti (\fBESYS_CONTEXT\fP * esys_context, TSS2_TCTI_CONTEXT ** tcti)"
- Return the used TCTI context\&.
- .PP
- If a tcti context was passed into Esys_Initialize then this tcti context is return\&. If NULL was passed in, then NULL will be returned\&. This function is useful before Esys_Finalize to retrieve the tcti context and perform a clean Tss2_Tcti_Finalize\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIesys_context\fP [in] The \fBESYS_CONTEXT\fP\&.
- .br
- \fItcti\fP [out] The TCTI context used to connect to the TPM (may be NULL)\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on Success\&.
- .br
- \fITSS2_ESYS_RC_BAD_REFERENCE\fP if esysContext or tcti is NULL\&.
- .RE
- .PP
- .SS "TSS2_RC Esys_Initialize (\fBESYS_CONTEXT\fP ** esys_context, TSS2_TCTI_CONTEXT * tcti, TSS2_ABI_VERSION * abiVersion)"
- Initialize an \fBESYS_CONTEXT\fP for further use\&.
- .PP
- Initialize an \fBESYS_CONTEXT\fP that holds all the state and metadata information during an interaction with the TPM\&. If not specified, load a TCTI in this order: Library libtss2-tcti-default\&.so (link to the preferred TCTI) Library libtss2-tcti-tabrmd\&.so (tabrmd) Device /dev/tpmrm0 (kernel resident resource manager) Device /dev/tpm0 (hardware TPM) TCP socket localhost:2321 (TPM simulator)
- .PP
- \fBParameters:\fP
- .RS 4
- \fIesys_context\fP [out] The \fBESYS_CONTEXT\fP\&.
- .br
- \fItcti\fP [in] The TCTI context used to connect to the TPM (may be NULL)\&.
- .br
- \fIabiVersion\fP [in,out] The abi version to check and the abi version supported by this implementation (may be NULL)\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_ESYS_RC_SUCCESS\fP if the function call was a success\&.
- .br
- \fITSS2_ESYS_RC_BAD_REFERENCE\fP if esysContext is NULL\&.
- .br
- \fITSS2_ESYS_RC_MEMORY\fP if the ESAPI cannot allocate enough memory to create the context\&.
- .br
- \fITSS2_RCs\fP produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally\&.
- .RE
- .PP
- .SS "TSS2_RC Esys_SetTimeout (\fBESYS_CONTEXT\fP * esys_context, int32_t timeout)"
- Set the timeout of Esys asynchronous functions\&.
- .PP
- Sets the timeout for the _finish() functions in the asynchronous versions of the Esys commands\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIesys_context\fP [in] The \fBESYS_CONTEXT\fP\&.
- .br
- \fItimeout\fP [in] The timeout in ms or -1 to block indefinately\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on Success\&.
- .br
- \fITSS2_ESYS_RC_BAD_REFERENCE\fP if esysContext is NULL\&.
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for tpm2-tss from the source code\&.
|