Tss2_TctiLdr_Finalize.3.in 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .\" Process this file with
  2. .\" groff -man -Tascii foo.1
  3. .\"
  4. .TH Tss2_TctiLdr_Finalize 3 "MARCH 2019" "TPM2 Software Stack"
  5. .SH NAME
  6. Tss2_TctiLdr_Finalize \- Function to finalize a TCTI context instantiated
  7. by the Tss2_TctiLdr_Initialize function.
  8. .SH SYNOPSIS
  9. .B #include <tss2/tss2_tctildr.h>
  10. .sp
  11. .sp
  12. .BI "TSS2_RC Tss2_TctiLdr_Finalize (TSS2_TCTI_CONTEXT " "**CONTEXT" ");"
  13. .sp
  14. .SH DESCRIPTION
  15. The
  16. .BR Tss2_TctiLdr_Finalize ()
  17. function destroys an instance of a TCTI context instantiated by the
  18. .BR Tss2_TctLdr_Initialize ()
  19. function. It also frees any resources associated with loading the
  20. required TCTI library.
  21. .sp
  22. The
  23. .I context
  24. parameter is a double pointer to a TCTI context. When successfully
  25. finalized the provided reference will be set to NULL by the function.
  26. .sp
  27. .SH RETURN VALUE
  28. This function returns no value.
  29. .SH EXAMPLE
  30. Example code.
  31. .sp
  32. .nf
  33. #include <inttypes.h>
  34. #include <stdlib.h>
  35. #include <stdio.h>
  36. #include <tss2/tss2_tctildr.h>
  37. TSS2_TCTI_CONTEXT *ctx = NULL;
  38. TSS2_RC rc = Tss2_TctiLdr_Initialize (NULL, NULL, &ctx);
  39. if (rc != TSS2_RC_SUCCESS) {
  40. fprintf (stderr, "Initialization of default TCTI context failed with "
  41. "response code: 0x%" PRIx32 "\n", rc);
  42. exit (EXIT_FAILURE);
  43. }
  44. if (ctx != NULL)
  45. Tss2_TctiLdr_Finalize (&ctx);
  46. exit (EXIT_SUCCESS);
  47. .fi