Fapi_CreateKey(3)

From the Library Functions Manual, this is Fapi_CreateKey(3), bestie β€” header energy folded in, no cap. 🫢

🌸 NAME 🌸

Fapi_CreateKey β€” literally Fapi_CreateKey. That’s the name, that’s the vibe. πŸ’…

✨ SYNOPSIS ✨

🧚 Functions 🧚

TSS2_RC Fapi_CreateKey (FAPI_CONTEXT *context, char const *path, char
    const *type, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateKey_Async (FAPI_CONTEXT *context, char const *path,
    char const *type, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateKey_Finish (FAPI_CONTEXT *context)

πŸ’… Detailed Description πŸ’…

These are the FAPI functions that invoke CreateKey, either as a one-call situation or in an asynchronous manner. It’s giving β€œsame key creation, different timing energy.” ⭐

πŸ’– Function Documentation πŸ’–

🌟 Fapi_CreateKey β€” the one-call cutie 🌟

TSS2_RC Fapi_CreateKey (FAPI_CONTEXT * context, char const * path, char const * type, char const * policyPath, char const * authValue)

One-Call function for Fapi_CreateKey β€” main character energy, periodt. πŸ‘‘

Creates a key inside the TPM based on the Key type, using the supplied policy and authValue. The key is then stored either in the FAPI metadata store or the TPM.

πŸ’– Parameters πŸ’–

  • context β€” The FAPI_CONTEXT, bestie. The whole setup.
  • path β€” The path where the new key is stored.
  • type β€” The type of the new key. May be NULL.
  • policyPath β€” The path to the policy that is associated with the new key. May be NULL.
  • authValue β€” The authorization value for the new key. May be NULL.

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or path is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath is non-NULL and does not map to a FAPI policy.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if the parent key does not map to a FAPI key.
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if a file already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if the keyType is non-NULL and invalid.
  • 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_TRY_AGAIN β€” if an I/O operation is not finished yet and this function needs to be called again.
  • TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN β€” if a required authorization callback is not set.
  • 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_GENERAL_FAILURE β€” if an internal error happened.
  • TSS2_FAPI_RC_NOT_PROVISIONED β€” FAPI was not provisioned.
  • 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.

πŸ¦‹ Fapi_CreateKey_Async β€” the async girlie πŸ¦‹

TSS2_RC Fapi_CreateKey_Async (FAPI_CONTEXT * context, char const * path, char const * type, char const * policyPath, char const * authValue)

Asynchronous function for Fapi_CreateKey β€” because sometimes you gotta start the vibe and finish it later. πŸ’«

Creates a key inside the TPM based on the Key type, using the supplied policy and authValue. The key is then stored either in the FAPI metadata store or the TPM.

Bestie, call Fapi_CreateKey_Finish to finish the execution of this command. Don’t leave it hanging, fr fr. 🫢

πŸ’– Parameters πŸ’–

  • context β€” The FAPI_CONTEXT.
  • path β€” The path where the new key is stored.
  • type β€” The type of the new key. May be NULL.
  • policyPath β€” The path to the policy that is associated with the new key. May be NULL.
  • authValue β€” The authorization value for the new key. May be NULL.

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or path is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath is non-NULL and does not map to a FAPI policy.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if the parent key does not map to a FAPI key.
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if a file already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if the keyType is non-NULL and invalid.
  • 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_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.

πŸŽ€ Fapi_CreateKey_Finish β€” the closing act πŸŽ€

TSS2_RC Fapi_CreateKey_Finish (FAPI_CONTEXT * context)

Asynchronous finish function for Fapi_CreateKey β€” the β€œokay we’re wrapping this up” moment. ✨

This function should be called after a previous Fapi_CreateKey_Async.

πŸ’– Parameters πŸ’–

  • context β€” The FAPI_CONTEXT.

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if 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_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_ESYS_RC_* β€” possible error codes of ESAPI.
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error happened.
  • TSS2_FAPI_RC_NOT_PROVISIONED β€” FAPI was not provisioned.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if a key was not found.
  • TSS2_FAPI_RC_BAD_PATH β€” if the path is used in inappropriate context or contains illegal characters.
  • TSS2_FAPI_RC_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.
  • 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_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 to tag here β€” Doxygen did its thing. 🫢


Okay that’s the whole page, bestie! πŸ’– Shoutout to the footer: source tpm2-tss, Version 4.1.5, title Fapi_CreateKey(3) β€” no separate date line was in this footer, so I’m not inventing one. πŸŽ€

πŸ“¦ where this page comes from