Tss2_TctiLdr_Finalize - Man Page

Function to finalize a TCTI context instantiated by the Tss2_TctiLdr_Initialize function.

Synopsis

#include <tss2/tss2_tctildr.h>

TSS2_RC Tss2_TctiLdr_Finalize (TSS2_TCTI_CONTEXT **CONTEXT);

Description

The Tss2_TctiLdr_Finalize() function destroys an instance of a TCTI context instantiated by the Tss2_TctLdr_Initialize() function. It also frees any resources associated with loading the required TCTI library.

The context parameter is a double pointer to a TCTI context. When successfully finalized the provided reference will be set to NULL by the function.

Return Value

This function returns no value.

Example

Example code.

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>

#include <tss2/tss2_tctildr.h>

TSS2_TCTI_CONTEXT *ctx = NULL;
TSS2_RC rc = Tss2_TctiLdr_Initialize (NULL, NULL, &ctx);
if (rc != TSS2_RC_SUCCESS) {
    fprintf (stderr, "Initialization of default TCTI context failed with "
             "response code: 0x%" PRIx32 "0, rc);
    exit (EXIT_FAILURE);
}

if (ctx != NULL)
    Tss2_TctiLdr_Finalize (&ctx);

exit (EXIT_SUCCESS);

Author

TPM2 Software Project <https://github.com/tpm2-software/tpm2-tss>

See Also

Tss2_Tcti_Device_Init(3), Tss2_Tcti_Socket_Init(3), Tss2_TctiLdr_Initialize(3), Tss2_TctiLdr_Finalize(3), tcti-device(7), tcti-socket(7), tcti-tabrmd(7), tpm2-abrmd(8)

Colophon

This page is part of release 4.1.3 of Open Source implementation of the TCG TPM2 Software Stack (TSS2). A description of the project, information about reporting bugs, and the latest version of this page can be found at https://github.com/tpm2-software/tpm2-tss/.

Referenced By

tss2-tcti-cmd(7), Tss2_Tcti_Cmd_Init(3), tss2-tcti-device(7), Tss2_Tcti_Device_Init(3), tss2-tcti-i2c-ftdi(7), tss2-tcti-i2c-helper(7), tss2-tctildr(7), Tss2_TctiLdr_FreeInfo(3), Tss2_TctiLdr_GetInfo(3), Tss2_TctiLdr_Initialize(3), tss2-tcti-mssim(7), Tss2_Tcti_Mssim_Init(3), tss2-tcti-spidev(7), tss2-tcti-spi-ftdi(7), tss2-tcti-spi-helper(7), tss2-tcti-spi-ltt2go(7), tss2-tcti-swtpm(7).

MARCH 2019 TPM2 Software Stack