Fapi_Import(3)

✨ Fapi_Import(3) ✨

okay so bestie πŸ’–, welcome to Fapi_Import(3) from the Library Functions Manual β€” this is the tpm2-tss page where FAPI imports a JSON encoded policy, policy template or key and stores it at a path. There are three functions: the one-call, the async start, and the async finish. Let's go, no cap. ✨


πŸŽ€ NAME πŸŽ€

Fapi_Import β€” Fapi_Import

(yes bestie, that's the whole name section, periodt πŸ’…)


πŸ’– SYNOPSIS πŸ’–

TSS2_RC Fapi_Import (FAPI_CONTEXT *context, char const *path, char const *importData)
TSS2_RC Fapi_Import_Async (FAPI_CONTEXT *context, char const *path, char const *importData)
TSS2_RC Fapi_Import_Finish (FAPI_CONTEXT *context)

πŸ¦‹ Detailed Description πŸ¦‹

These are the FAPI functions that invoke Import either as a one-call situation or in an asynchronous manner. ✨


πŸŽ€ Function Documentation πŸŽ€

πŸ’… TSS2_RC Fapi_Import (FAPI_CONTEXT *context, char const *path, char const *importData)

One-Call function for Fapi_Import.

It imports a JSON encoded policy, policy template or key and stores it at the given path. Slay. 🌸

Parameters

  • context β€” The FAPI_CONTEXT
  • path β€” the path to which the object is imported
  • importData β€” The data that is imported

Return values

  • TSS2_RC_SUCCESS β€” the function call was a success. βœ…
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, path or importData is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_PATH β€” If path does not map to a FAPI policy or key.
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if a policy or key already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if importData contains invalid data.
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending.
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved.
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_FAPI_RC_NO_TPM β€” if FAPI was initialized in no-TPM-mode via its config file.
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred.
  • 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_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_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_NOT_PROVISIONED β€” FAPI was not provisioned.

πŸ’… TSS2_RC Fapi_Import_Async (FAPI_CONTEXT *context, char const *path, char const *importData)

Asynchronous function for Fapi_Import.

It imports a JSON encoded policy, policy template or key and stores it at the given path.

Call Fapi_Import_Finish to finish the execution of this command.

Parameters

  • context β€” The FAPI_CONTEXT
  • path β€” the path to which the object is imported
  • importData β€” The data that is imported

Return values

  • TSS2_RC_SUCCESS β€” the function call was a success. βœ…
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, path or importData is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_PATH β€” If path does not map to a FAPI policy or key.
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if a policy or key already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if importData contains invalid data.
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending.
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved.
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_FAPI_RC_NO_TPM β€” if FAPI was initialized in no-TPM-mode via its config file.
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred.
  • TSS2_ESYS_RC_* β€” possible error codes of ESAPI.
  • TSS2_FAPI_RC_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.
  • TSS2_FAPI_RC_NOT_PROVISIONED β€” FAPI was not provisioned.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if a key was not found.

πŸ’… TSS2_RC Fapi_Import_Finish (FAPI_CONTEXT *context)

Asynchronous finish function for Fapi_Import.

This function should be called after a previous Fapi_Import_Async.

Parameters

  • context β€” The FAPI_CONTEXT

Return values

  • TSS2_RC_SUCCESS β€” the function call was a success. βœ…
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending.
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved.
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_FAPI_RC_TRY_AGAIN β€” if the asynchronous operation is not yet complete. Call this function again later.
  • 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_BAD_VALUE β€” if an invalid value was passed into the function.
  • 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_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_NOT_PROVISIONED β€” FAPI was not provisioned.
  • TSS2_FAPI_RC_BAD_PATH β€” if the path is used in inappropriate context or contains illegal characters.
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if the object already exists in object store.

🌸 Author 🌸

Generated automatically by Doxygen for tpm2-tss from the source code. No human author line here, just Doxygen doing its automated little dance. πŸ’…


footer energy: tpm2-tss, Version 4.1.5, page Fapi_Import(3) β€” and the footer doesn't list a date, so I'm not inventing one, bestie. πŸ’–βœ¨πŸ«Ά
πŸ“¦ where this page comes from