Esys_PCR_SetAuthValue(3)

πŸ’… Esys_PCR_SetAuthValue(3) β€” the TPM2_PCR_SetAuthValue ESAPI era πŸ’…

okay bestie, so this is a page from the Library Functions Manual (the tpm2-tss crew), and it's all about Esys_PCR_SetAuthValue β€” literally the ESAPI function for the TPM2_PCR_SetAuthValue command. πŸ‘‘


✨ NAME ✨

Esys_PCR_SetAuthValue β€” the ESAPI function for the TPM2_PCR_SetAuthValue command. that's it, that's the name section, and honestly it ate. πŸŽ€


πŸ¦‹ SYNOPSIS β€” the function squad πŸ¦‹

Functions

TSS2_RC Esys_PCR_SetAuthValue_Async (ESYS_CONTEXT *esysContext, ESYS_TR
    pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
    const TPM2B_DIGEST *auth)
TSS2_RC Esys_PCR_SetAuthValue (ESYS_CONTEXT *esysContext, ESYS_TR
    pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
    const TPM2B_DIGEST *auth)
TSS2_RC Esys_PCR_SetAuthValue_Finish (ESYS_CONTEXT *esysContext)

three functions, one little family, all returning TSS2_RC. no cap. πŸ’œ


🌸 Detailed Description 🌸

so basically this is the ESAPI function that lets you invoke the TPM2_PCR_SetAuthValue command β€” and you get to pick your vibe:

  • one-call style, or
  • asynchronous style.

your call, main character. ✨


πŸ”₯ Function Documentation πŸ”₯

TSS2_RC Esys_PCR_SetAuthValue (ESYS_CONTEXT * esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST * auth)

One-Call function for TPM2_PCR_SetAuthValue

okay so this one is the one-call variant πŸ’… β€” it's gonna block until the TPM response is available. like, it's not leaving the group chat until the reply lands, periodt.

quick facts, bestie:

  • all input parameters are const 🫢
  • the memory for non-simple output parameters is allocated by the function implementation β€” you don't gotta malloc that yourself, she handles it.

Parameters

  • esysContext β€” the ESYS_CONTEXT. (your whole world, basically)
  • pcrHandle β€” handle for a PCR that may have an authorization value set. 🧚
  • shandle1 β€” session handle for authorization of pcrHandle
  • shandle2 β€” second session handle.
  • shandle3 β€” third session handle.
  • auth β€” the desired authorization value. πŸ’–

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success. slay.
  • TSS2_ESYS_RC_BAD_REFERENCE β€” if the esysContext or required input pointers or required output handle references are NULL. 😭
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption is detected. πŸ’€
  • TSS2_ESYS_RC_MEMORY β€” if the ESAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_ESYS_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending. (girl, one thing at a time πŸ™ˆ)
  • TSS2_ESYS_RC_INSUFFICIENT_RESPONSE β€” if the TPM's response does not at least contain the tag, response length, and response code.
  • TSS2_ESYS_RC_MALFORMED_RESPONSE β€” if the TPM's response is corrupted.
  • TSS2_ESYS_RC_RSP_AUTH_FAILED β€” if the response HMAC from the TPM did not verify. 🚩
  • TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONS β€” if more than one session has the 'decrypt' attribute bit set.
  • TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS β€” if more than one session has the 'encrypt' attribute bit set.
  • TSS2_ESYS_RC_BAD_TR β€” if any of the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type or if required ESYS_TR objects are ESYS_TR_NONE. πŸ‘€
  • TSS2_ESYS_RC_NO_ENCRYPT_PARAM β€” if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter.
  • TSS2_RCs produced by lower layers of the software stack β€” may be returned to the caller unaltered unless handled internally. (the lore goes deep, iykyk πŸŒ€)

TSS2_RC Esys_PCR_SetAuthValue_Async (ESYS_CONTEXT * esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST * auth)

Asynchronous function for TPM2_PCR_SetAuthValue

this is the asynchronous variant 🌈 β€” she's not sticking around. the function returns as soon as the command has been sent downwards the stack to the TPM. like, she sent the text and put her phone on do-not-disturb. πŸ’…

also:

  • all input parameters are const ✨
  • in order to retrieve the TPM's response, you call Esys_PCR_SetAuthValue_Finish. that's the whole point, bestie.

Parameters

  • esysContext β€” the ESYS_CONTEXT.
  • pcrHandle β€” handle for a PCR that may have an authorization value set. 🧚
  • shandle1 β€” session handle for authorization of pcrHandle
  • shandle2 β€” second session handle.
  • shandle3 β€” third session handle.
  • auth β€” the desired authorization value. πŸ’–

Return values

  • ESYS_RC_SUCCESS β€” if the function call was a success. (yes, this one's written as ESYS_RC_SUCCESS, not TSS2_ESYS_RC_SUCCESS β€” keeping it exactly as the page says, no editing the sacred texts 🫑)
  • TSS2_ESYS_RC_BAD_REFERENCE β€” if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption is detected.
  • TSS2_ESYS_RC_MEMORY β€” if the ESAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_RCs produced by lower layers of the software stack β€” may be returned to the caller unaltered unless handled internally.
  • TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONS β€” if more than one session has the 'decrypt' attribute bit set.
  • TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS β€” if more than one session has the 'encrypt' attribute bit set.
  • TSS2_ESYS_RC_BAD_TR β€” if any of the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type or if required ESYS_TR objects are ESYS_TR_NONE.
  • TSS2_ESYS_RC_NO_ENCRYPT_PARAM β€” if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter.

TSS2_RC Esys_PCR_SetAuthValue_Finish (ESYS_CONTEXT * esysContext)

Asynchronous finish function for TPM2_PCR_SetAuthValue

the finish function ✨ β€” this is where you actually get the results back. the page says: "This function returns the results of a TPM2_PCR_SetAuthValue command invoked via Esys_PCR_SetAuthValue_Finish." β€” yep, it literally says Esys_PCR_SetAuthValue_Finish there, that's what the source page says, we don't fix, we don't touch, we report. πŸ™ˆ

more deets:

  • all non-simple output parameters are allocated by the function's implementation 🫢
  • NULL can be passed for every output parameter if the value is not required β€” very "no thoughts, head empty, parameter optional" of her.

Parameters

  • esysContext β€” the ESYS_CONTEXT. (that's the whole list, she's low maintenance πŸ’œ)

Return values

  • TSS2_RC_SUCCESS β€” on success.
  • ESYS_RC_SUCCESS β€” if the function call was a success.
  • TSS2_ESYS_RC_BAD_REFERENCE β€” if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption is detected.
  • TSS2_ESYS_RC_MEMORY β€” if the ESAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_ESYS_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending.
  • TSS2_ESYS_RC_TRY_AGAIN β€” if the timeout counter expires before the TPM response is received. ⏳ (she's taking forever to reply, try again later)
  • TSS2_ESYS_RC_INSUFFICIENT_RESPONSE β€” if the TPM's response does not at least contain the tag, response length, and response code.
  • TSS2_ESYS_RC_RSP_AUTH_FAILED β€” if the response HMAC from the TPM did not verify.
  • TSS2_ESYS_RC_MALFORMED_RESPONSE β€” if the TPM's response is corrupted.
  • TSS2_RCs produced by lower layers of the software stack β€” may be returned to the caller unaltered unless handled internally.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for tpm2-tss from the source code. like, nobody hand-wrote this, the robot did it, and honestly the robot ate. πŸ€–πŸ’…


and that's the page, bestie!! πŸŽ€βœ¨πŸ¦‹

one tiny reminder before you go: this whole thing is from tpm2-tss, Version 4.1.5 β€” that's the source and version stamped on the footer of this man page. so when you cite it, cite it right. πŸ«ΆπŸ’–πŸŒΈ
πŸ“¦ where this page comes from