Fapi_Quote.3 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. .TH "Fapi_Quote" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. Fapi_Quote
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "TSS2_RC \fBFapi_Quote\fP (\fBFAPI_CONTEXT\fP *context, uint32_t *pcrList, size_t pcrListSize, char const *keyPath, char const *quoteType, uint8_t const *qualifyingData, size_t qualifyingDataSize, char **quoteInfo, uint8_t **signature, size_t *signatureSize, char **pcrLog, char **certificate)"
  13. .br
  14. .ti -1c
  15. .RI "TSS2_RC \fBFapi_Quote_Async\fP (\fBFAPI_CONTEXT\fP *context, uint32_t *pcrList, size_t pcrListSize, char const *keyPath, char const *quoteType, uint8_t const *qualifyingData, size_t qualifyingDataSize)"
  16. .br
  17. .ti -1c
  18. .RI "TSS2_RC \fBFapi_Quote_Finish\fP (\fBFAPI_CONTEXT\fP *context, char **quoteInfo, uint8_t **signature, size_t *signatureSize, char **pcrLog, char **certificate)"
  19. .br
  20. .in -1c
  21. .SH "Detailed Description"
  22. .PP
  23. FAPI functions to invoke Quote either as one-call or in an asynchronous manner\&.
  24. .SH "Function Documentation"
  25. .PP
  26. .SS "Fapi_Quote (\fBFAPI_CONTEXT\fP * context, uint32_t * pcrList, size_t pcrListSize, char const * keyPath, char const * quoteType, uint8_t const * qualifyingData, size_t qualifyingDataSize, char ** quoteInfo, uint8_t ** signature, size_t * signatureSize, char ** pcrLog, char ** certificate)"
  27. One-Call function for Fapi_Quote
  28. .PP
  29. Given a set of PCRs and a restricted signing key, it will sign those PCRs and return the quote\&.
  30. .PP
  31. \fBParameters:\fP
  32. .RS 4
  33. \fIcontext\fP The \fBFAPI_CONTEXT\fP
  34. .br
  35. \fIpcrList\fP The list of PCRs that are to be quoted
  36. .br
  37. \fIpcrListSize\fP The size of pcrList in bytes
  38. .br
  39. \fIkeyPath\fP The path to the signing key
  40. .br
  41. \fIquoteType\fP The type of quote\&. May be NULL
  42. .br
  43. \fIqualifyingData\fP A nonce provided by the caller\&. May be NULL
  44. .br
  45. \fIqualifyingDataSize\fP The size of qualifyingData in bytes\&. Must be 0 if qualifyingData is NULL
  46. .br
  47. \fIquoteInfo\fP A JSON-encoded structure holding the inputs to the quote operation
  48. .br
  49. \fIsignature\fP The signature of the PCRs
  50. .br
  51. \fIsignatureSize\fP The size of the signature in bytes\&. May be NULL
  52. .br
  53. \fIpcrLog\fP The log of the PCR\&. May be NULL
  54. .br
  55. \fIcertificate\fP The certificate associated with the signing key\&. May be NULL
  56. .RE
  57. .PP
  58. \fBReturn values:\fP
  59. .RS 4
  60. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  61. .br
  62. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if context, pcrList, keyPath, quoteInfo or signature is NULL\&.
  63. .br
  64. \fITSS2_FAPI_RC_BAD_CONTEXT\fP if context corruption is detected\&.
  65. .br
  66. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if path does not map to a FAPI entity\&.
  67. .br
  68. \fITSS2_FAPI_RC_BAD_KEY\fP if the entity at path is not a key, or is a key that is unsuitable for the requested operation\&.
  69. .br
  70. \fITSS2_FAPI_RC_BAD_VALUE\fP if qualifyingData is invalid or if qualifyingDataSize is zero\&.
  71. .br
  72. \fITSS2_FAPI_RC_IO_ERROR\fP if the data cannot be saved\&.
  73. .br
  74. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  75. .br
  76. \fITSS2_FAPI_RC_MEMORY\fP if the FAPI cannot allocate enough memory for internal operations or return parameters\&.
  77. .br
  78. \fITSS2_FAPI_RC_NO_TPM\fP if FAPI was initialized in no-TPM-mode via its config file\&.
  79. .br
  80. \fITSS2_FAPI_RC_TRY_AGAIN\fP if an I/O operation is not finished yet and this function needs to be called again\&.
  81. .br
  82. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  83. .br
  84. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  85. .br
  86. \fITSS2_FAPI_RC_AUTHORIZATION_UNKNOWN\fP if a required authorization callback is not set\&.
  87. .br
  88. \fITSS2_FAPI_RC_AUTHORIZATION_FAILED\fP if the authorization attempt fails\&.
  89. .br
  90. \fITSS2_FAPI_RC_POLICY_UNKNOWN\fP if policy search for a certain policy digest was not successful\&.
  91. .br
  92. \fITSS2_ESYS_RC_*\fP possible error codes of ESAPI\&.
  93. .br
  94. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  95. .br
  96. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  97. .RE
  98. .PP
  99. .SS "Fapi_Quote_Async (\fBFAPI_CONTEXT\fP * context, uint32_t * pcrList, size_t pcrListSize, char const * keyPath, char const * quoteType, uint8_t const * qualifyingData, size_t qualifyingDataSize)"
  100. Asynchronous function for Fapi_Quote
  101. .PP
  102. Given a set of PCRs and a restricted signing key, it will sign those PCRs and return the quote\&.
  103. .PP
  104. Call Fapi_Quote_Finish to finish the execution of this command\&.
  105. .PP
  106. \fBParameters:\fP
  107. .RS 4
  108. \fIcontext\fP The \fBFAPI_CONTEXT\fP
  109. .br
  110. \fIpcrList\fP The list of PCRs that are to be quoted
  111. .br
  112. \fIpcrListSize\fP The size of pcrList in bytes
  113. .br
  114. \fIkeyPath\fP The path to the signing key
  115. .br
  116. \fIquoteType\fP The type of quote\&. May be NULL
  117. .br
  118. \fIqualifyingData\fP A nonce provided by the caller\&. May be NULL
  119. .br
  120. \fIqualifyingDataSize\fP The size of qualifyingData in bytes\&. Must be 0 if qualifyingData is NULL
  121. .RE
  122. .PP
  123. \fBReturn values:\fP
  124. .RS 4
  125. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  126. .br
  127. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if context, pcrList or keyPath is NULL\&.
  128. .br
  129. \fITSS2_FAPI_RC_BAD_CONTEXT\fP if context corruption is detected\&.
  130. .br
  131. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if path does not map to a FAPI entity\&.
  132. .br
  133. \fITSS2_FAPI_RC_BAD_KEY\fP if the entity at path is not a key, or is a key that is unsuitable for the requested operation\&.
  134. .br
  135. \fITSS2_FAPI_RC_BAD_VALUE\fP if pcrListSize is 0, qualifyingData is invalid or if qualifyingDataSize is zero\&.
  136. .br
  137. \fITSS2_FAPI_RC_IO_ERROR\fP if the data cannot be saved\&.
  138. .br
  139. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  140. .br
  141. \fITSS2_FAPI_RC_MEMORY\fP if the FAPI cannot allocate enough memory for internal operations or return parameters\&.
  142. .br
  143. \fITSS2_FAPI_RC_NO_TPM\fP if FAPI was initialized in no-TPM-mode via its config file\&.
  144. .RE
  145. .PP
  146. .SS "Fapi_Quote_Finish (\fBFAPI_CONTEXT\fP * context, char ** quoteInfo, uint8_t ** signature, size_t * signatureSize, char ** pcrLog, char ** certificate)"
  147. Asynchronous finish function for Fapi_Quote
  148. .PP
  149. This function should be called after a previous Fapi_Quote_Async\&.
  150. .PP
  151. \fBParameters:\fP
  152. .RS 4
  153. \fIcontext\fP The \fBFAPI_CONTEXT\fP
  154. .br
  155. \fIquoteInfo\fP A JSON-encoded structure holding the inputs to the quote operation
  156. .br
  157. \fIsignature\fP The signature of the PCRs
  158. .br
  159. \fIsignatureSize\fP The size of the signature in bytes\&. May be NULL
  160. .br
  161. \fIpcrLog\fP The log of the PCR\&. May be NULL
  162. .br
  163. \fIcertificate\fP The certificate associated with the signing key\&. May be NULL
  164. .RE
  165. .PP
  166. \fBReturn values:\fP
  167. .RS 4
  168. \fITSS2_RC_SUCCESS\fP if the function call was a success\&.
  169. .br
  170. \fITSS2_FAPI_RC_BAD_REFERENCE\fP if context, quoteInfor or signature is NULL\&.
  171. .br
  172. \fITSS2_FAPI_RC_BAD_CONTEXT\fP if context corruption is detected\&.
  173. .br
  174. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  175. .br
  176. \fITSS2_FAPI_RC_IO_ERROR\fP if the data cannot be saved\&.
  177. .br
  178. \fITSS2_FAPI_RC_MEMORY\fP if the FAPI cannot allocate enough memory for internal operations or return parameters\&.
  179. .br
  180. \fITSS2_FAPI_RC_TRY_AGAIN\fP if the asynchronous operation is not yet complete\&. Call this function again later\&.
  181. .br
  182. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  183. .br
  184. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  185. .br
  186. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if a key was not found\&.
  187. .br
  188. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  189. .br
  190. \fITSS2_FAPI_RC_AUTHORIZATION_UNKNOWN\fP if a required authorization callback is not set\&.
  191. .br
  192. \fITSS2_FAPI_RC_AUTHORIZATION_FAILED\fP if the authorization attempt fails\&.
  193. .br
  194. \fITSS2_FAPI_RC_POLICY_UNKNOWN\fP if policy search for a certain policy digest was not successful\&.
  195. .br
  196. \fITSS2_ESYS_RC_*\fP possible error codes of ESAPI\&.
  197. .br
  198. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  199. .br
  200. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  201. .RE
  202. .PP
  203. .SH "Author"
  204. .PP
  205. Generated automatically by Doxygen for tpm2-tss from the source code\&.