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β TheFAPI_CONTEXTpathβ The path to the new NV indextypeβ The intended type of the new NV index. May beNULLsizeβ The size of the new NV index in bytes. May be0if the size is inferred from thetypepolicyPathβ The path to the policy that is associated with the new NV index. May beNULLauthValueβ The authorization value that is associated with the new NV index. May beNULL
Return values π
TSS2_RC_SUCCESSβ if the function call was a success. slay πTSS2_FAPI_RC_BAD_REFERENCEβ ifcontextorpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected. πTSS2_FAPI_RC_PATH_ALREADY_EXISTSβ if an NV index already exists atpath.TSS2_FAPI_RC_BAD_VALUEβ iftypeis non-NULLbut invalid or does not match thesize.TSS2_FAPI_RC_BAD_PATHβ ifpolicyPathis non-NULLand does not map to a FAPI policy, or ifpathdos 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β TheFAPI_CONTEXTpathβ The path to the new NV indextypeβ The intended type of the new NV index. May beNULLsizeβ The size of the new NV index in bytes. May be0if the size is inferred from thetypepolicyPathβ The path to the policy that is associated with the new NV index. May beNULLauthValueβ The authorization value that is associated with the new NV index. May beNULL
Return values πΈ
TSS2_RC_SUCCESSβ if the function call was a success. πTSS2_FAPI_RC_BAD_REFERENCEβ ifcontextorpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_PATH_ALREADY_EXISTSβ if an NV index already exists atpath.TSS2_FAPI_RC_BAD_VALUEβ iftypeis non-NULLbut invalid or does not match thesize.TSS2_FAPI_RC_BAD_PATHβ ifpolicyPathis non-NULLand does not map to a FAPI policy, or ifpathdos 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β TheFAPI_CONTEXT
Return values β
TSS2_RC_SUCCESSβ if the function call was a success. periodt πTSS2_FAPI_RC_BAD_REFERENCEβ ifcontextisNULL.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
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms