|
TSS2_RC | ifapi_branch_selection (TPML_POLICYBRANCHES *branches, size_t *branch_idx, void *userdata) |
|
TSS2_RC | ifapi_exec_auth_nv_policy (TPM2B_NV_PUBLIC *nv_public, TPMI_ALG_HASH hash_alg, void *userdata) |
|
TSS2_RC | ifapi_get_duplicate_name (TPM2B_NAME *name, void *userdata) |
|
TSS2_RC | ifapi_get_key_public (const char *path, TPMT_PUBLIC *public, void *ctx) |
|
TSS2_RC | ifapi_get_nv_public (const char *path, TPM2B_NV_PUBLIC *nv_public, void *ctx) |
|
TSS2_RC | ifapi_get_object_name (const char *path, TPM2B_NAME *name, void *ctx) |
|
TSS2_RC | ifapi_policy_action (const char *action, void *userdata) |
|
TSS2_RC | ifapi_policyeval_cbauth (TPM2B_NAME *name, ESYS_TR *object_handle, ESYS_TR *auth_handle, ESYS_TR *authSession, void *userdata) |
|
TSS2_RC | ifapi_read_pcr (TPMS_PCR_SELECT *pcr_select, TPML_PCR_SELECTION *pcr_selection, TPML_PCRVALUES **pcr_values, void *ctx) |
|
Provides internal callbacks functions for policy execution.
◆ ifapi_branch_selection()
TSS2_RC ifapi_branch_selection |
( |
TPML_POLICYBRANCHES * |
branches, |
|
|
size_t * |
branch_idx, |
|
|
void * |
userdata |
|
) |
| |
Callback for branch selection of policy or.
- Parameters
-
[in] | branches | The list of policy branches. |
[out] | branch_idx | The index of the selcted branch. |
[in,out] | userdata | The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_BAD_REFERENCE | if context is NULL. |
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN | if no branch selection callback is defined. This callback will be needed of or policies which have to be executed. |
TSS2_FAPI_RC_AUTHORIZATION_FAILED | if the computed branch index delivered by the callback does not identify a branch. |
◆ ifapi_exec_auth_nv_policy()
TSS2_RC ifapi_exec_auth_nv_policy |
( |
TPM2B_NV_PUBLIC * |
nv_public, |
|
|
TPMI_ALG_HASH |
hash_alg, |
|
|
void * |
userdata |
|
) |
| |
Callback for executing a policy identified by a digest stored in a nv object.
- Parameters
-
[in] | nv_public | the public data of the nv object which stores the digest of the authorized policy. |
[in] | hash_alg | The hash algorithm used for policy computation. |
[in] | userdata | The user context to retrieve the policy. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_MEMORY | if it's not possible to allocate enough memory. |
TSS2_FAPI_RC_BAD_REFERENCE | If no user data id passed or context stack is not initialized. |
TSS2_FAPI_RC_IO_ERROR | If an error occurs during access to the policy store. |
TSS2_FAPI_RC_PATH_NOT_FOUND | If a policy for a certain path was not found. |
TSS2_FAPI_RC_POLICY_UNKNOWN | If policy search for a certain policy digest was not successful. |
TPM2_RC_BAD_AUTH | If the authentication for an object needed for policy execution fails. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |
TSS2_FAPI_RC_TRY_AGAIN | if an I/O operation is not finished yet and this function needs to be called again. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_KEY_NOT_FOUND | if a key was not found. |
TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred. |
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN | if a required authorization callback is not set. |
TSS2_FAPI_RC_AUTHORIZATION_FAILED | if the authorization attempt fails. |
TSS2_ESYS_RC_* | possible error codes of ESAPI. |
TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters. |
TSS2_FAPI_RC_NOT_PROVISIONED | FAPI was not provisioned. |
◆ ifapi_get_duplicate_name()
TSS2_RC ifapi_get_duplicate_name |
( |
TPM2B_NAME * |
name, |
|
|
void * |
userdata |
|
) |
| |
Callback for getting the name of a key to be duplicated.
- Parameters
-
[out] | name | the name of the object to be duplicated. |
[in] | userdata | The user context to retrieve the key. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_BAD_REFERENCE | if the context is not passed or the object to be duplicated is not set. |
◆ ifapi_get_key_public()
TSS2_RC ifapi_get_key_public |
( |
const char * |
path, |
|
|
TPMT_PUBLIC * |
public, |
|
|
void * |
ctx |
|
) |
| |
Get public data of a key from keystore.
- Parameters
-
[in] | path | The relative path of the key. |
[out] | public | The caller allocated public structure. |
[in,out] | ctx | The context to access io and keystore module and to store the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_IO_ERROR | if the data cannot be loaded. |
TSS2_FAPI_RC_MEMORY | if the FAPI cannot allocate enough memory for internal operations or return parameters. |
TSS2_FAPI_RC_BAD_TEMPLATE | If the loaded template is not appropriate for this operation. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |
TSS2_FAPI_RC_TRY_AGAIN | if an I/O operation is not finished yet and this function needs to be called again. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_PATH_NOT_FOUND | if a FAPI object path was not found during authorization. |
TSS2_FAPI_RC_KEY_NOT_FOUND | if a key was not found. |
TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred. |
TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
TSS2_FAPI_RC_NOT_PROVISIONED | FAPI was not provisioned. |
TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters. |
◆ ifapi_get_nv_public()
TSS2_RC ifapi_get_nv_public |
( |
const char * |
path, |
|
|
TPM2B_NV_PUBLIC * |
nv_public, |
|
|
void * |
ctx |
|
) |
| |
Get public data of a NV object from keystore.
- Parameters
-
[in] | path | The relative path of the NV object. |
[out] | nv_public | The caller allocated public structure. |
[in,out] | ctx | The context to access io and keystore module and to store the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_IO_ERROR | if the data cannot be loaded. |
TSS2_FAPI_RC_MEMORY | if the FAPI cannot allocate enough memory for internal operations or return parameters. |
TSS2_FAPI_RC_BAD_TEMPLATE | If the loaded template is not appropriate for this operation. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |
TSS2_FAPI_RC_TRY_AGAIN | if an I/O operation is not finished yet and this function needs to be called again. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_PATH_NOT_FOUND | if a FAPI object path was not found during authorization. |
TSS2_FAPI_RC_KEY_NOT_FOUND | if a key was not found. |
TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred. |
TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
TSS2_FAPI_RC_NOT_PROVISIONED | FAPI was not provisioned. |
TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters. |
◆ ifapi_get_object_name()
TSS2_RC ifapi_get_object_name |
( |
const char * |
path, |
|
|
TPM2B_NAME * |
name, |
|
|
void * |
ctx |
|
) |
| |
Get TPM name of an object from key keystore.
- Parameters
-
[in] | path | The relative path of the object. |
[out] | name | The caller allocate public structure. |
[in,out] | ctx | The context to access io and keystore module and to store the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_IO_ERROR | if the data cannot be loaded. |
TSS2_FAPI_RC_MEMORY | if the FAPI cannot allocate enough memory for internal operations or return parameters. |
TSS2_FAPI_RC_BAD_TEMPLATE | If the loaded template is not appropriate for this operation. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |
TSS2_FAPI_RC_TRY_AGAIN | if an I/O operation is not finished yet and this function needs to be called again. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_PATH_NOT_FOUND | if a FAPI object path was not found during authorization. |
TSS2_FAPI_RC_KEY_NOT_FOUND | if a key was not found. |
TSS2_FAPI_RC_GENERAL_FAILURE | if an internal error occurred. |
TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
TSS2_FAPI_RC_NOT_PROVISIONED | FAPI was not provisioned. |
TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters. |
◆ ifapi_policy_action()
TSS2_RC ifapi_policy_action |
( |
const char * |
action, |
|
|
void * |
userdata |
|
) |
| |
Callback for policy action.
- Parameters
-
[in] | action | The name of the policy action. |
[in,out] | userdata | The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN | If the callback for branch selection is not defined. This callback will be needed of or policies have to be executed. |
TSS2_FAPI_RC_BAD_REFERENCE | If no user data is passed. |
◆ ifapi_policyeval_cbauth()
TSS2_RC ifapi_policyeval_cbauth |
( |
TPM2B_NAME * |
name, |
|
|
ESYS_TR * |
object_handle, |
|
|
ESYS_TR * |
auth_handle, |
|
|
ESYS_TR * |
authSession, |
|
|
void * |
userdata |
|
) |
| |
Callback for authorization of objects used by policy.
- Parameters
-
[in] | name | The name of the object to be authorized. |
[in] | object_handle | The ESYS handle of the used object. |
[in] | auth_handle | will be used for object authorization. For keys it will we equal to the object handle. |
[out] | authSession | The session used for object authorization. |
[in,out] | userdata | The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_BAD_REFERENCE | if context or policy is NULL. |
TSS2_FAPI_RC_MEMORY | if memory allocation failed. |
TSS2_FAPI_RC_TRY_AGAIN | if the asynchronous operation is not yet complete. Call this function again later. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |
TSS2_FAPI_RC_PATH_NOT_FOUND | If a policy was not found. |
TSS2_FAPI_RC_KEY_NOT_FOUND | If a key was not found. |
TSS2_FAPI_RC_IO_ERROR | If an IO error occurred during reading a policy or a key. |
TSS2_FAPI_RC_GENERAL_FAILURE | If an error in an used library occurred. |
TSS2_FAPI_RC_BAD_VALUE | if an invalid value was passed into the function. |
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN | if a required authorization callback is not set. |
TSS2_FAPI_RC_AUTHORIZATION_FAILED | if the authorization attempt fails. |
TSS2_FAPI_RC_POLICY_UNKNOWN | if policy search for a certain policy digest was not successful. |
TSS2_ESYS_RC_* | possible error codes of ESAPI. |
TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters. |
TSS2_FAPI_RC_NOT_PROVISIONED | FAPI was not provisioned. |
◆ ifapi_read_pcr()
TSS2_RC ifapi_read_pcr |
( |
TPMS_PCR_SELECT * |
pcr_select, |
|
|
TPML_PCR_SELECTION * |
pcr_selection, |
|
|
TPML_PCRVALUES ** |
pcr_values, |
|
|
void * |
ctx |
|
) |
| |
Read values of PCR registers and clear selection.
- Parameters
-
[in,out] | pcr_select | The registers to be read (bank selection from profile). |
[in,out] | pcr_selection | The registers to be read (with bank selection). |
[out] | pcr_values | The callee-allocated public structure. |
[in,out] | ctx | The context to access io and keystore module and to store the io state. |
- Return values
-
TSS2_RC_SUCCESS | on success. |
TSS2_FAPI_RC_BAD_VALUE | if the input parameters had inappropriate values. |
TSS2_FAPI_RC_TRY_AGAIN | if the asynchronous operation is not yet complete. Call this function again later. |
TSS2_FAPI_RC_MEMORY | if memory allocation failed. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has an asynchronous operation already pending. |