Fapi_NvRead(3)
πΈ Fapi_NvRead(3) πΈ
Bestie, welcome to Fapi_NvRead(3) from the Library Functions Manual π. This page is all about the FAPI way to invoke NvRead β one-call style, async style, and the finish line. No cap, itβs giving βread data from an NV index within the TPMβ energy.
β¨ NAME β¨
Fapi_NvRead - Fapi_NvRead π
β¨ SYNOPSIS β¨
π οΈ Functions
TSS2_RC Fapi_NvRead (FAPI_CONTEXT *context, char const *path, uint8_t
**data, size_t *size, char **logData)
TSS2_RC Fapi_NvRead_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_NvRead_Finish (FAPI_CONTEXT *context, uint8_t **data,
size_t *size, char **logData)
π« Detailed Description π«
FAPI functions to invoke NvRead either as a one-call or in an asynchronous manner, periodt β¨. Thatβs literally the whole function family vibe.
π§ Function Documentation π§
β¨ TSS2_RC Fapi_NvRead (FAPI_CONTEXT * context, char const * nvPath, uint8_t ** data, size_t * size, char ** logData) β¨
One-Call function for Fapi_NvRead π«Ά.
Reads data from an NV index within the TPM. The FAPI will automatically do the multiple reads if the NV index is larger than the TPM's TPM2_MAX_NV_BUFFER_SIZE β automatic, slay π
.
π Parameters π
contextβ TheFAPI_CONTEXT.nvPathβ The path of the NV index to read.dataβ The data that was read from the NV index.sizeβ The size ofdatain bytes. May beNULL.logDataβ The log data of the NV index if the index is of type"extend". May beNULL.
π Return values π
TSS2_RC_SUCCESSif the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEifcontext,nvPathordataisNULL.TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.TSS2_FAPI_RC_BAD_PATHifnvPathis not found.TSS2_FAPI_RC_AUTHORIZATION_FAILEDif authorization fails.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNif don't know how to authenticate.TSS2_FAPI_RC_NV_NOT_READABLEif the NV is not a readable index.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_FAPI_RC_KEY_NOT_FOUNDif a key was not found.TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.TSS2_FAPI_RC_TRY_AGAINif an I/O operation is not finished yet and this function needs to be called again.TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.TSS2_FAPI_RC_POLICY_UNKNOWNif policy search for a certain policy digest was not successful.TSS2_ESYS_RC_*possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.
β¨ TSS2_RC Fapi_NvRead_Async (FAPI_CONTEXT * context, char const * nvPath) β¨
Asynchronous function for Fapi_NvRead π¦.
Reads data from an NV index within the TPM. The FAPI will automatically do the multiple reads if the NV index is larger than the TPM's TPM2_MAX_NV_BUFFER_SIZE.
Call Fapi_NvRead_Finish to finish the execution of this command.
π Parameters π
contextβ TheFAPI_CONTEXT.nvPathβ The path of the NV index to read.
π Return values π
TSS2_RC_SUCCESSif the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEifcontextornvPathisNULL. *TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.TSS2_FAPI_RC_BAD_PATHifnvPathis not found.TSS2_FAPI_RC_AUTHORIZATION_FAILEDif authorization fails.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNif don't know how to authenticate.TSS2_FAPI_RC_NV_NOT_READABLEif the NV is not a readable index.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_FAPI_RC_KEY_NOT_FOUNDif a key was not found.TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.
β¨ TSS2_RC Fapi_NvRead_Finish (FAPI_CONTEXT * context, uint8_t ** data, size_t * size, char ** logData) β¨
Asynchronous finish function for Fapi_NvRead π.
This function should be called after a previous Fapi_NvRead_Async.
π Parameters π
contextβ TheFAPI_CONTEXT.dataβ The data that was read from the NV index.sizeβ The size ofdatain bytes. May beNULL.logDataβ The log data of the NV index if the index is of type"extend". May beNULL.
π Return values π
TSS2_RC_SUCCESSif the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEifcontextordataisNULL.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_PATHif a path is used in inappropriate context or contains illegal characters.TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.TSS2_FAPI_RC_KEY_NOT_FOUNDif a key was not found.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNif a required authorization callback is not set.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_ESYS_RC_*possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.
π Author π
Generated automatically by Doxygen for tpm2-tss from the source code. Doxygen did it, not me, bestie πβ¨.
Source/version vibe check: tpm2-tss, Version 4.1.5, page Fapi_NvRead(3) π«Ά. Bye bestie β go read those NV indices responsibly! πβ¨
π¦ 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