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β TheFAPI_CONTEXT, bestie. The whole setup.pathβ The path where the new key is stored.typeβ The type of the new key. May beNULL.policyPathβ The path to the policy that is associated with the new key. May beNULL.authValueβ The authorization value for the new key. 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_BAD_PATHβ ifpolicyPathis non-NULLand 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 atpath.TSS2_FAPI_RC_BAD_VALUEβ if thekeyTypeis non-NULLand 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β TheFAPI_CONTEXT.pathβ The path where the new key is stored.typeβ The type of the new key. May beNULL.policyPathβ The path to the policy that is associated with the new key. May beNULL.authValueβ The authorization value for the new key. 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_BAD_PATHβ ifpolicyPathis non-NULLand 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 atpath.TSS2_FAPI_RC_BAD_VALUEβ if thekeyTypeis non-NULLand 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β TheFAPI_CONTEXT.
π₯ Return values π₯
TSS2_RC_SUCCESSβ if the function call was a success.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.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
- 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