Fapi_CreateSeal(3)
β¨ Fapi_CreateSeal π β the Library Functions Manual glow-up π
okay bestie, so this is Fapi_CreateSeal(3) from the Library Functions Manual, and it's literally the page that tells you how to seal stuff up with the FAPI. it's giving "put a secret in a box and lock it" energy and honestly? iconic. let's get into it π¦
πΈ NAME πΈ
Fapi_CreateSeal β bestie, that's literally the name, the whole name, and nothing but the name π
β¨ SYNOPSIS β¨
π«Ά Functions
TSS2_RC Fapi_CreateSeal (FAPI_CONTEXT *context, char const *path, char
const *type, size_t size, char const *policyPath, char const
*authValue, uint8_t const *data)
TSS2_RC Fapi_CreateSeal_Async (FAPI_CONTEXT *context, char const *path,
char const *type, size_t size, char const *policyPath, char const
*authValue, uint8_t const *data)
TSS2_RC Fapi_CreateSeal_Finish (FAPI_CONTEXT *context)
π Detailed Description π
these are the FAPI functions that invoke CreateSeal, and you can run it either as a one-call situation or in an asynchronous manner. pick your vibe, both slay π
π Function Documentation π
π TSS2_RC Fapi_CreateSeal (FAPI_CONTEXT * context, char const * path, char const * type, size_t size, char const * policyPath, char const * authValue, uint8_t const * data)
this is the one-call function for Fapi_CreateSeal. one call and you're done, no cap β¨
it creates a sealed object and stores it in the FAPI metadata store. and here's the cute part: if no data is provided, the TPM generates random data to fill the sealed object. the TPM is basically doing improv and honestly? main character energy π₯
π Parameters
contextβ TheFAPI_CONTEXTpathβ The path to the new sealed objecttypeβ The type of the new sealed object. May beNULLsizeβ The size of the new sealed object. Must not be0β οΈpolicyPathβ The path to the policy that is associated with the new sealed object. May beNULLauthValueβ The authorization value for the new sealed object. May beNULLdataβ The data that is to be sealed within the new object. May beNULL
π¦ Return values
TSS2_RC_SUCCESSif the function call was a success. πTSS2_FAPI_RC_BAD_REFERENCEifcontext, orpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected. πTSS2_FAPI_RC_KEY_NOT_FOUNDif the parent key does not map to a FAPI key.TSS2_FAPI_RC_BAD_PATHifpolicyPathis non-NULLand does not map to a FAPI key.TSS2_FAPI_RC_PATH_ALREADY_EXISTSif a sealed object already exists atpath. like it's already taken bestie πTSS2_FAPI_RC_BAD_VALUEif thekeyTypeis invalid.TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMif FAPI was initialized in no-TPM-mode via its config file.TSS2_FAPI_RC_TRY_AGAINif an I/O operation is not finished yet and this function needs to be called again. round two, let's go πββοΈTSS2_FAPI_RC_AUTHORIZATION_UNKNOWNif a required authorization callback is not set.TSS2_ESYS_RC_*possible error codes of ESAPI.TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occured.TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.TSS2_FAPI_RC_AUTHORIZATION_FAILEDif the authorization attempt fails. πTSS2_FAPI_RC_POLICY_UNKNOWNif policy search for a certain policy digest was not successful.
π TSS2_RC Fapi_CreateSeal_Async (FAPI_CONTEXT * context, char const * path, char const * type, size_t size, char const * policyPath, char const * authValue, uint8_t const * data)
the asynchronous function for Fapi_CreateSeal β same energy, but it does the thing in the background while you live your life π§
it creates a sealed object and stores it in the FAPI metadata store. and again, if no data is provided, the TPM generates random data to fill the sealed object.
bestie, you gotta call Fapi_CreateSeal_Finish to finish the execution of this command. don't leave it hanging π
π Parameters
contextβ TheFAPI_CONTEXTpathβ The path to the new sealed objecttypeβ The type of the new sealed object. May beNULLsizeβ The size of the new sealed object. Must not be0β οΈpolicyPathβ The path to the policy that is associated with the new sealed object. May beNULLauthValueβ The authorization value for the new sealed object. May beNULLdataβ The data that is to be sealed within the new object. May beNULL
π¦ Return values
TSS2_RC_SUCCESSif the function call was a success. πTSS2_FAPI_RC_BAD_REFERENCEifcontext, orpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected. πTSS2_FAPI_RC_KEY_NOT_FOUNDif the parent key does not map to a FAPI key.TSS2_FAPI_RC_BAD_PATHifpolicyPathis non-NULLand does not map to a FAPI key.TSS2_FAPI_RC_PATH_ALREADY_EXISTSif a sealed object already exists atpath. πTSS2_FAPI_RC_BAD_VALUEif thekeyTypeis invalid.TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMif FAPI was initialized in no-TPM-mode via its config file.TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.
π TSS2_RC Fapi_CreateSeal_Finish (FAPI_CONTEXT * context)
the asynchronous finish function for Fapi_CreateSeal β the grand finale basically β
this function should be called after a previous Fapi_CreateSeal. it's the "okay we're wrapping this up" moment, periodt.
π Parameters
contextβ TheFAPI_CONTEXT
π¦ Return values
TSS2_RC_SUCCESSif the function call was a success. πTSS2_FAPI_RC_BAD_REFERENCEifcontextisNULL.TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected. πTSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_TRY_AGAINif the asynchronous operation is not yet complete. Call this function again later. πTSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNif a required authorization callback is not set.TSS2_ESYS_RC_*possible error codes of ESAPI.TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occured.TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.TSS2_FAPI_RC_KEY_NOT_FOUNDif a key was not found.TSS2_FAPI_RC_BAD_PATHif the path is used in inappropriate context or contains illegal characters. π«TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.TSS2_FAPI_RC_AUTHORIZATION_FAILEDif the authorization attempt fails. πTSS2_FAPI_RC_POLICY_UNKNOWNif policy search for a certain policy digest was not successful.TSS2_FAPI_RC_PATH_ALREADY_EXISTSif the object already exists in object store.
π Author π
Generated automatically by Doxygen for tpm2-tss from the source code. (not me writing my own author bio, the robots did it π€β¨)
and that's the page bestie! this gem is from tpm2-tss, Version 4.1.5, dated Fapi_CreateSeal(3) β go forth and seal your secrets, you're gonna slay ππ¦πΈ
π¦ 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