Esys_PP_Commands(3)

πŸ’… Esys_PP_Commands(3) β€” the tpm2-tss manual, but make it make sense

okay so bestie, we're in the Library Functions Manual section and this whole page is literally about one thing: the ESAPI function for the TPM2_PP_Commands command. That's it. That's the vibe. PP stands for Physical Presence and yes you're gonna need it, no cap 🫢


✨ SYNOPSIS ✨

here's the trio of functions, and I need you to read them exactly as written because C does not forgive:

TSS2_RC Esys_PP_Commands_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth,
    ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC
    *setList, const TPML_CC *clearList)
TSS2_RC Esys_PP_Commands (ESYS_CONTEXT *esysContext, ESYS_TR auth,
    ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC
    *setList, const TPML_CC *clearList)
TSS2_RC Esys_PP_Commands_Finish (ESYS_CONTEXT *esysContext)

like, look at them. one-call, async, finish. the holy trinity of "please talk to the TPM for me" 🌸


πŸ¦‹ Detailed Description πŸ¦‹

so what is this? it's the ESAPI function to invoke the TPM2_PP_Commands command β€” and you can run it either as a one-call or in an asynchronous manner. that's the whole deal. pick your fighter πŸ’–


πŸ‘‘ Function Documentation πŸ‘‘

🌟 TSS2_RC Esys_PP_Commands (ESYS_CONTEXT * esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC * setList, const TPML_CC * clearList)

One-Call function for TPM2_PP_Commands β€” this is the "just do it and wait" version, bestie. it invokes the TPM2_PP_Commands command in a one-call variant, which means the function will block until the TPM response is available. yes, block. sit there. be patient. 😭

all input parameters are const (so nobody's sneaking changes in behind your back), and the memory for non-simple output parameters is allocated by the function implementation. iykyk 🧚

Parameters

  • esysContext β€” The ESYS_CONTEXT. your whole world, basically.
  • auth β€” TPM2_RH_PLATFORM+TPM2_PP. that's the combo, don't get cute with it.
  • shandle1 β€” Session handle for authorization of auth.
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.
  • setList β€” List of commands to be added to those that will require that Physical Presence be asserted. πŸ”₯
  • clearList β€” List of commands that will no longer require that Physical Presence be asserted. bye felicia πŸ‘‹

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. check your pointers bestie πŸ™ˆ
  • 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. one at a time, please πŸ’…
  • 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_DECRYPT_PARAM β€” if one of the sessions has the 'decrypt' attribute set and the command does not support encryption of the first command parameter.
  • 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. so like, don't be surprised if you get a random one, it's allowed 😌

🌈 TSS2_RC Esys_PP_Commands_Async (ESYS_CONTEXT * esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC * setList, const TPML_CC * clearList)

Asynchronous function for TPM2_PP_Commands β€” the "send it and dip" version. this invokes the TPM2_PP_Commands command in an asynchronous variant, meaning the function will return as soon as the command has been sent downwards the stack to the TPM. no waiting. main character energy.

all input parameters are const. and in order to actually retrieve the TPM's response, you gotta call Esys_PP_Commands_Finish. don't forget, bestie, the response isn't gonna come find you πŸŽ€

Parameters

  • esysContext β€” The ESYS_CONTEXT.
  • auth β€” TPM2_RH_PLATFORM+TPM2_PP.
  • shandle1 β€” Session handle for authorization of auth.
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.
  • setList β€” List of commands to be added to those that will require that Physical Presence be asserted.
  • clearList β€” List of commands that will no longer require that Physical Presence be asserted.

Return values

  • ESYS_RC_SUCCESS β€” if the function call was a success. (yes, it's ESYS_RC_SUCCESS here, not TSS2_RC_SUCCESS β€” that's literally what the page says, don't come for me ✨)
  • 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_DECRYPT_PARAM β€” if one of the sessions has the 'decrypt' attribute set and the command does not support encryption of the first command parameter.
  • 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_PP_Commands_Finish (ESYS_CONTEXT * esysContext)

Asynchronous finish function for TPM2_PP_Commands β€” the "okay so what did it say" follow-up. this returns the results of a TPM2_PP_Commands command invoked via Esys_PP_Commands_Finish. πŸ™ˆ (yes, the original text says invoked via Esys_PP_Commands_Finish β€” that's what's written, so that's what you get)

all non-simple output parameters are allocated by the function's implementation, and you can pass NULL for every output parameter if you don't need the value. so chill. no pressure πŸ’œ

Parameters

  • esysContext β€” The ESYS_CONTEXT.

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. ⏳
  • 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. so nobody hand-wrote this and honestly? it shows. bless. πŸ’–


ok that's the whole page, bestie. every flag, every return code, every const. nothing dropped. now go assert some Physical Presence. periodt. πŸ‘‘

✨ tpm2-tss Β· Version 4.1.5 Β· Esys_PP_Commands(3) ✨ β€” that's the footer energy, mwah πŸ’‹

πŸ“¦ where this page comes from