Fapi_CreateNv(3)

πŸ’… Fapi_CreateNv β€” from the Library Functions Manual ✨

okay bestie, buckle up, because today we're talking about Fapi_CreateNv and its two chaotic siblings, and honestly? it's giving "make a new NV index in your TPM" and I'm obsessed. πŸŽ€


🌸 NAME 🌸

Fapi_CreateNv β€” literally the whole point of this page, no notes πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

TSS2_RC Fapi_CreateNv (FAPI_CONTEXT *context, char const *path, char const
    *type, size_t size, char const *policyPath, char const
    *authValue)

TSS2_RC Fapi_CreateNv_Async (FAPI_CONTEXT *context, char const *path,
    char const *type, size_t size, char const *policyPath, char const
    *authValue)

TSS2_RC Fapi_CreateNv_Finish (FAPI_CONTEXT *context)

✨ Detailed Description ✨

These are the FAPI functions that let you invoke CreateNv β€” and you get to pick your fighter: either the one-call way (do it all in one go, queen) or the asynchronous way (spread out over multiple calls like a true multitasker). πŸ’…


🫢 Function Documentation 🫢

πŸ’œ TSS2_RC Fapi_CreateNv (FAPI_CONTEXT * context, char const * path, char const * type, size_t size, char const * policyPath, char const * authValue)

One-Call function for Fapi_CreateNv β€” the main character energy entry point. 🌟

This command creates an NV index in the TPM using a given path and type. That's it, that's the vibe.

Parameters πŸ“

  • context β€” The FAPI_CONTEXT
  • path β€” The path to the new NV index
  • type β€” The intended type of the new NV index. May be NULL
  • size β€” The size of the new NV index in bytes. May be 0 if the size is inferred from the type
  • policyPath β€” The path to the policy that is associated with the new NV index. May be NULL
  • authValue β€” The authorization value that is associated with the new NV index. May be NULL

Return values 🌈

  • TSS2_RC_SUCCESS β€” if the function call was a success. slay πŸ’–
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or path is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected. 😭
  • TSS2_FAPI_RC_PATH_ALREADY_EXISTS β€” if an NV index already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if type is non-NULL but invalid or does not match the size.
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath is non-NULL and does not map to a FAPI policy, or if path dos not refer to a valid NV index path.
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending. one thing at a time bestie πŸ™ˆ
  • 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. literally "come back 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_GENERAL_FAILURE β€” if an internal error occurred.
  • TSS2_FAPI_RC_NV_TOO_SMALL β€” if too many NV handles are defined.
  • TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN β€” if a required authorization callback is not set.
  • TSS2_FAPI_RC_AUTHORIZATION_FAILED β€” if the authorization attempt fails. not today, satan 🚫
  • 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_CreateNv_Async (FAPI_CONTEXT * context, char const * path, char const * type, size_t size, char const * policyPath, char const * authValue)

Asynchronous function for Fapi_CreateNv β€” the "I'll get to it, I promise" version. ✨

This command creates an NV index in the TPM using a given path and type.

πŸŽ€ Heads up bestie: you gotta call Fapi_CreateNv_Finish to actually finish the execution of this command. Don't leave it hanging!

Parameters 🧚

  • context β€” The FAPI_CONTEXT
  • path β€” The path to the new NV index
  • type β€” The intended type of the new NV index. May be NULL
  • size β€” The size of the new NV index in bytes. May be 0 if the size is inferred from the type
  • policyPath β€” The path to the policy that is associated with the new NV index. May be NULL
  • authValue β€” The authorization value that is associated with the new NV index. 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_PATH_ALREADY_EXISTS β€” if an NV index already exists at path.
  • TSS2_FAPI_RC_BAD_VALUE β€” if type is non-NULL but invalid or does not match the size.
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath is non-NULL and does not map to a FAPI policy, or if path dos not refer to a valid NV index path.
  • 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.

πŸ¦‹ TSS2_RC Fapi_CreateNv_Finish (FAPI_CONTEXT * context)

Asynchronous finish function for Fapi_CreateNv β€” the grand finale, the closing number, the "okay we're done here" moment. πŸ‘‘

This function should be called after a previous Fapi_CreateNv_Async. No async, no finish β€” that's the rule, iykyk.

Parameters πŸŽ€

  • context β€” The FAPI_CONTEXT

Return values ⭐

  • TSS2_RC_SUCCESS β€” if the function call was a success. periodt πŸ’œ
  • 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. she's still cooking πŸ”₯
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function.
  • 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_PATH β€” if a path is used in inappropriate context or contains illegal characters.
  • TSS2_FAPI_RC_NV_TOO_SMALL β€” if too many NV handles are defined.
  • 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_PATH_ALREADY_EXISTS β€” if the object already exists in object store. πŸ™ˆ

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for tpm2-tss from the source code. yes, a robot wrote this, and honestly? it ate. πŸ’€βœ¨


and that's the whole page bestie!! this gorgeousness is from tpm2-tss, Version 4.1.5 β€” go forth and create those NV indices, you absolute icon πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from