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 β€” The FAPI_CONTEXT
  • pcrIndex β€” The index of the PCR to read
  • pcrValue β€” The value of the PCR. May be NULL
  • pcrValueSize β€” The size of value in bytes. May be NULL
  • pcrLog β€” The PCR log. May be NULL

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, pcrValue or pcrValueSize is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_VALUE β€” if pcrIndex is 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 β€” The FAPI_CONTEXT
  • pcrIndex β€” The index of the PCR to read

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_BAD_VALUE β€” if pcrIndex is 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 β€” The FAPI_CONTEXT
  • pcrValue β€” The value of the PCR. May be NULL
  • pcrValueSize β€” The size of value in bytes. May be NULL
  • pcrLog β€” The PCR log. May be NULL

πŸ”₯ Return values πŸ”₯

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, pcrValue or pcrValueSize is NULL.
  • 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