Fapi_PcrRead(3)
π Fapi_PcrRead(3) π
okay so bestie, you're in the Library Functions Manual and this is the whole Fapi_PcrRead(3) saga β¨ it's giving TPM realness, no cap. We're talking PCR reads, async bestie behavior, event logs, and a truly iconic pile of return codes π
πΈ NAME πΈ
Fapi_PcrRead - Fapi_PcrRead π
β¨ SYNOPSIS β¨
π Functions π
TSS2_RC Fapi_PcrRead (FAPI_CONTEXT *context, uint32_t pcrIndex, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)
TSS2_RC Fapi_PcrRead_Async (FAPI_CONTEXT *context, uint32_t pcrIndex)
TSS2_RC Fapi_PcrRead_Finish (FAPI_CONTEXT *context, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)
π¦ DETAILED DESCRIPTION π¦
FAPI functions to invoke PcrRead either as one-call or in an asynchronous manner. literally the whole vibe: one-call main character energy, or the async duo where Fapi_PcrRead_Async starts it and Fapi_PcrRead_Finish finishes it π«Ά
π FUNCTION DOCUMENTATION π
πΈ TSS2_RC Fapi_PcrRead πΈ
Exact signature, because we do not play with code names around here:
TSS2_RC Fapi_PcrRead (FAPI_CONTEXT *context, uint32_t pcrIndex, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)
One-Call function for Fapi_PcrRead π
Reads from a given PCR and returns the value and the event log. obsessed with a function that just gives you the PCR value and the log, fr fr π
π Parameters π
contextβ TheFAPI_CONTEXTpcrIndexβ The index of the PCR to readpcrValueβ The value of the PCR. May beNULLpcrValueSizeβ The size of value in bytes. May beNULLpcrLogβ The PCR log. May beNULL
π₯ Return values π₯
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontext,pcrValueorpcrValueSizeisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_BAD_VALUEβ ifpcrIndexis 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_FAPI_RC_AUTHORIZATION_FAILEDβ if the authorization attempt fails.TSS2_FAPI_RC_GENERAL_FAILUREβ if an internal error occurred.TSS2_FAPI_RC_POLICY_UNKNOWNβ if policy search for a certain policy digest was not successful.TSS2_FAPI_RC_NO_CERTβ if an error did occur during certificate downloading.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_ESYS_RC_*β possible error codes of ESAPI.
π¦ TSS2_RC Fapi_PcrRead_Async π¦
Exact signature, zero edits:
TSS2_RC Fapi_PcrRead_Async (FAPI_CONTEXT *context, uint32_t pcrIndex)
Asynchronous function for Fapi_PcrRead β¨
Reads from a given PCR and returns the value and the event log. same PCR-read energy, but make it async π
Call Fapi_PcrRead_Finish to finish the execution of this command. that's the rule, bestie β async starts it, finish ends it π
π Parameters π
contextβ TheFAPI_CONTEXTpcrIndexβ The index of the PCR to read
π₯ 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_VALUEβ ifpcrIndexis 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_ESYS_RC_*β possible error codes of ESAPI.
π§ TSS2_RC Fapi_PcrRead_Finish π§
Exact signature, periodt:
TSS2_RC Fapi_PcrRead_Finish (FAPI_CONTEXT *context, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)
Asynchronous finish function for Fapi_PcrRead π
This function should be called after a previous Fapi_PcrRead_Async. no skipping steps, bestie β this is the finish-line icon π
π Parameters π
contextβ TheFAPI_CONTEXTpcrValueβ The value of the PCR. May beNULLpcrValueSizeβ The size of value in bytes. May beNULLpcrLogβ The PCR log. May beNULL
π₯ Return values π₯
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontext,pcrValueorpcrValueSizeisNULL.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_ESYS_RC_*β possible error codes of ESAPI.
π AUTHOR π
Generated automatically by Doxygen for tpm2-tss from the source code. slay, honestly π«Ά
kisses and TPM vibes π β tpm2-tss Version 4.1.5 π that's the source/version flex from the footer, bestie, and no invented date business because the page didn't give 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