ifapi_policy_util_exec.3 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .TH "ifapi_policy_util_exec" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ifapi_policy_util_exec
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "TSS2_RC \fBifapi_policyutil_execute\fP (\fBFAPI_CONTEXT\fP *context, \fBESYS_TR\fP *session)"
  13. .br
  14. .ti -1c
  15. .RI "TSS2_RC \fBifapi_policyutil_execute_prepare\fP (\fBFAPI_CONTEXT\fP *context, TPMI_ALG_HASH hash_alg, \fBTPMS_POLICY\fP *policy)"
  16. .br
  17. .in -1c
  18. .SH "Detailed Description"
  19. .PP
  20. Provides functions for the execution of policies for object authorization\&.
  21. .SH "Function Documentation"
  22. .PP
  23. .SS "TSS2_RC ifapi_policyutil_execute (\fBFAPI_CONTEXT\fP * context, \fBESYS_TR\fP * session)"
  24. State machine to Execute the TPM policy commands needed for the current policy\&.
  25. .PP
  26. In the first step a session will be created if no session is passed\&. In the second step the policy engine will execute the policy\&.
  27. .PP
  28. \fBParameters:\fP
  29. .RS 4
  30. \fIcontext\fP The fapi context with the pointer to the policy stack\&.
  31. .br
  32. \fIsession\fP The policy session to be extended or if the value is equal zero or ESYS_TR_NONE a new created session will been be stored in this parameter\&.
  33. .RE
  34. .PP
  35. \fBReturn values:\fP
  36. .RS 4
  37. \fITSS2_RC_SUCCESS\fP on success\&.
  38. .br
  39. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  40. .br
  41. \fITSS2_FAPI_RC_BAD_VALUE\fP If wrong values are detected during execution\&.
  42. .br
  43. \fITSS2_FAPI_RC_IO_ERROR\fP If an error occurs during access to the policy store\&.
  44. .br
  45. \fITSS2_FAPI_RC_POLICY_UNKNOWN\fP If policy search for a certain policy digest was not successful\&.
  46. .br
  47. \fITSS2_FAPI_RC_BAD_TEMPLATE\fP In a invalid policy is loaded during execution\&.
  48. .br
  49. \fITPM2_RC_BAD_AUTH\fP If the authentication for an object needed for policy execution fails\&.
  50. .br
  51. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  52. .br
  53. \fITSS2_FAPI_RC_TRY_AGAIN\fP if an I/O operation is not finished yet and this function needs to be called again\&.
  54. .br
  55. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  56. .br
  57. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  58. .br
  59. \fITSS2_FAPI_RC_PATH_NOT_FOUND\fP if a FAPI object path was not found during authorization\&.
  60. .br
  61. \fITSS2_FAPI_RC_KEY_NOT_FOUND\fP if a key was not found\&.
  62. .br
  63. \fITSS2_FAPI_RC_AUTHORIZATION_UNKNOWN\fP if a required authorization callback is not set\&.
  64. .br
  65. \fITSS2_FAPI_RC_AUTHORIZATION_FAILED\fP if the authorization attempt fails\&.
  66. .br
  67. \fITSS2_ESYS_RC_*\fP possible error codes of ESAPI\&.
  68. .br
  69. \fITSS2_FAPI_RC_BAD_PATH\fP if the path is used in inappropriate context or contains illegal characters\&.
  70. .br
  71. \fITSS2_FAPI_RC_NOT_PROVISIONED\fP FAPI was not provisioned\&.
  72. .RE
  73. .PP
  74. .SS "TSS2_RC ifapi_policyutil_execute_prepare (\fBFAPI_CONTEXT\fP * context, TPMI_ALG_HASH hash_alg, \fBTPMS_POLICY\fP * policy)"
  75. Prepare the execution of a new policy on policy stack\&.
  76. .PP
  77. The context for the policy utility, the policy execution and the needed callbacks is initialized\&. The policy execution will be prepared\&. In this step the list of policies to be executed will be computed\&.
  78. .PP
  79. \fBParameters:\fP
  80. .RS 4
  81. \fIcontext\fP The fapi context with the pointer to the policy stack\&.
  82. .br
  83. \fIhash_alg\fP The hash algorithm used for the policy computation\&.
  84. .br
  85. \fIpolicy\fP The policy to be executed\&. Some policy elements will be used to store computed parameters needed for policy execution\&.
  86. .RE
  87. .PP
  88. \fBReturn values:\fP
  89. .RS 4
  90. \fITSS2_RC_SUCCESS\fP on success\&.
  91. .br
  92. \fITSS2_FAPI_RC_AUTHORIZATION_UNKNOWN\fP If the callback for branch selection is not defined\&. This callback will be needed of or policies have to be executed\&.
  93. .br
  94. \fITSS2_FAPI_RC_BAD_VALUE\fP If the computed branch index deliverd by the callback does not identify a branch\&.
  95. .br
  96. \fITSS2_FAPI_RC_BAD_REFERENCE\fP If no context is passed\&.
  97. .br
  98. \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
  99. .br
  100. \fITSS2_FAPI_RC_AUTHORIZATION_FAILED\fP if the authorization attempt fails\&.
  101. .br
  102. \fITSS2_ESYS_RC_*\fP possible error codes of ESAPI\&.
  103. .RE
  104. .PP
  105. .SH "Author"
  106. .PP
  107. Generated automatically by Doxygen for tpm2-tss from the source code\&.