Tss2_TctiLdr_Finalize.3 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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
  48. .SH AUTHOR
  49. Philip Tricca <philip.b.tricca@intel.com>
  50. .SH "SEE ALSO"
  51. .BR Tss2_Tcti_Device_Init (3),
  52. .BR Tss2_Tcti_Socket_Init (3),
  53. .BR Tss2_TctiLdr_Initialize (3),
  54. .BR Tss2_TctiLdr_Finalize (3),
  55. .BR tcti-device (7),
  56. .BR tcti-socket (7),
  57. .BR tcti-tabrmd (7),
  58. .BR tpm2-abrmd (8)
  59. .SH COLOPHON
  60. This page is part of release 3.2.0 of Open Source implementation of the
  61. TCG TPM2 Software Stack (TSS2). A description of the project, information
  62. about reporting bugs, and the latest version of this page can be found at
  63. \%https://github.com/tpm2-software/tpm2-tss/.