ifapi_profile.3 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. .TH "ifapi_profile" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ifapi_profile
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "void \fBifapi_profiles_finalize\fP (\fBIFAPI_PROFILES\fP *profiles)"
  13. .br
  14. .ti -1c
  15. .RI "TSS2_RC \fBifapi_profiles_get\fP (const \fBIFAPI_PROFILES\fP *profiles, const char *name, const \fBIFAPI_PROFILE\fP **profile)"
  16. .br
  17. .ti -1c
  18. .RI "TSS2_RC \fBifapi_profiles_initialize_async\fP (\fBIFAPI_PROFILES\fP *profiles, \fBIFAPI_IO\fP *io, const char *profilesdir, const char *defaultprofile)"
  19. .br
  20. .ti -1c
  21. .RI "TSS2_RC \fBifapi_profiles_initialize_finish\fP (\fBIFAPI_PROFILES\fP *profiles, \fBIFAPI_IO\fP *io)"
  22. .br
  23. .in -1c
  24. .SH "Detailed Description"
  25. .PP
  26. Provides functions for the handling of profiles stored in the object store\&.
  27. .SH "Function Documentation"
  28. .PP
  29. .SS "void ifapi_profiles_finalize (\fBIFAPI_PROFILES\fP * profiles)"
  30. Sanitizes and frees internal data structures of loaded profiles' information\&.
  31. .PP
  32. \fBParameters:\fP
  33. .RS 4
  34. \fIprofiles\fP The context for the profiles information\&.
  35. .RE
  36. .PP
  37. .SS "TSS2_RC ifapi_profiles_get (const \fBIFAPI_PROFILES\fP * profiles, const char * name, const \fBIFAPI_PROFILE\fP ** profile)"
  38. Return the profile data for a given profile name\&.
  39. .PP
  40. Returns a (const, not to be free'd) pointer to the profile data for a requested profile\&. If a NULL profile is requesten, then the default profile is returned\&. If a keypath is passed in, then the prefix is analysed\&. If that keypath starts with a profile then this profile is returned\&. Otherwise the default profile is returned\&.
  41. .PP
  42. \fBParameters:\fP
  43. .RS 4
  44. \fIprofiles\fP The profiles context
  45. .br
  46. \fIname\fP The name of the profile or the keypath
  47. .br
  48. \fIprofile\fP The pointer to the profile data\&.
  49. .RE
  50. .PP
  51. \fBReturn values:\fP
  52. .RS 4
  53. \fITSS2_RC_SUCCESS\fP on success\&.
  54. .br
  55. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if NULL pointers were passed in\&.
  56. .br
  57. \fITSS2_FAPI_RC_BAD_VALUE\fP if a profile is not found\&.
  58. .RE
  59. .PP
  60. .SS "TSS2_RC ifapi_profiles_initialize_async (\fBIFAPI_PROFILES\fP * profiles, \fBIFAPI_IO\fP * io, const char * profilesdir, const char * defaultprofile)"
  61. Initialize the profiles information in the context in an asynchronous way
  62. .PP
  63. Load the profile information from disk, fill the dictionary of loaded profiles and fill the default profile information into the context\&.
  64. .PP
  65. Call ifapi_profiles_initialize_finish to complete the operation\&.
  66. .PP
  67. \fBParameters:\fP
  68. .RS 4
  69. \fIprofiles\fP The context for the profiles information\&.
  70. .br
  71. \fIio\fP The input/output context being used for file I/O\&.
  72. .br
  73. \fIprofilesdir\fP The directory to load profile information from\&.
  74. .br
  75. \fIdefaultprofile\fP The name of the default profile to use\&.
  76. .RE
  77. .PP
  78. \fBReturn values:\fP
  79. .RS 4
  80. \fITSS2_RC_SUCCESS\fP on success\&.
  81. .br
  82. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if NULL pointers were passed in\&.
  83. .br
  84. \fITSS2_FAPI_RC_BAD_VALUE\fP if the profilesdir does not exist or is empty\&.
  85. .br
  86. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  87. .br
  88. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  89. .RE
  90. .PP
  91. .SS "TSS2_RC ifapi_profiles_initialize_finish (\fBIFAPI_PROFILES\fP * profiles, \fBIFAPI_IO\fP * io)"
  92. Initialize the profiles information in the context in an asynchronous way
  93. .PP
  94. Call after ifapi_profiles_initialize_async to complete the operation\&.
  95. .PP
  96. \fBParameters:\fP
  97. .RS 4
  98. \fIprofiles\fP The context for the profiles information\&.
  99. .br
  100. \fIio\fP The input/output context being used for file I/O\&.
  101. .RE
  102. .PP
  103. \fBReturn values:\fP
  104. .RS 4
  105. \fITSS2_RC_SUCCESS\fP on success\&.
  106. .br
  107. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if NULL pointers were passed in\&.
  108. .br
  109. \fITSS2_FAPI_RC_BAD_VALUE\fP if a profile could not be loaded\&.
  110. .br
  111. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  112. .br
  113. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  114. .br
  115. \fITSS2_FAPI_RC_TRY_AGAIN\fP if the I/O operation is not finished yet and this function needs to be called again\&.
  116. .RE
  117. .PP
  118. .SH "Author"
  119. .PP
  120. Generated automatically by Doxygen for tpm2-tss from the source code\&.