Esys_ReadClock(3)

πŸ’– Esys_ReadClock(3) β€” the TPM2_ReadClock ESAPI glow-up πŸ’–

okay so bestie, this whole page is the Library Functions Manual entry for Esys_ReadClock, and it's literally the ESAPI function for the TPM2_ReadClock command. yes. that one. pulling the clock out of your TPM. iconic behaviour tbh πŸ•βœ¨


πŸ¦‹ NAME πŸ¦‹

Esys_ReadClock β€” The ESAPI function for the TPM2_ReadClock command. that's it, that's the whole vibe 🫢


✨ SYNOPSIS ✨

πŸŽ€ Functions πŸŽ€

TSS2_RC Esys_ReadClock_Async (ESYS_CONTEXT *esysContext, ESYS_TR
    shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ReadClock (ESYS_CONTEXT *esysContext, ESYS_TR shandle1,
    ESYS_TR shandle2, ESYS_TR shandle3, TPMS_TIME_INFO **currentTime)
TSS2_RC Esys_ReadClock_Finish (ESYS_CONTEXT *esysContext, TPMS_TIME_INFO
    **currentTime)

three functions, one job, zero drama (okay maybe a little drama, see the return codes πŸ’…).


🌸 Detailed Description 🌸

ESAPI function to invoke the TPM2_ReadClock command either as a one-call or in an asynchronous manner. pick your fighter, both are valid, you're valid 🧚


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’œ TSS2_RC Esys_ReadClock (ESYS_CONTEXT * esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMS_TIME_INFO ** currentTime) πŸ’œ

One-Call function for TPM2_ReadClock β€” the "just do it and wait" girlie πŸ’…

This function invokes the TPM2_ReadClock command in a one-call variant. what that means, bestie: the function will block until the TPM response is available. like actually sit there and wait. no cap. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation β€” so she handles the malloc, you just receive the gift 🎁

Parameters

  • esysContext β€” The ESYS_CONTEXT.
  • shandle1 β€” First session handle.
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.
  • currentTime β€” . (callee-allocated) β€” yes the description is literally just a dot, the docs said "." and we respect the "." πŸ™ˆ

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. one at a time, queen ⏳
  • 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_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.

πŸ¦‹ TSS2_RC Esys_ReadClock_Async (ESYS_CONTEXT * esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3) πŸ¦‹

Asynchronous function for TPM2_ReadClock β€” the "send it and dip" girlie πŸƒβ€β™€οΈπŸ’¨

This function invokes the TPM2_ReadClock command in a asynchronous variant. This means the function will return as soon as the command has been sent downwards the stack to the TPM. All input parameters are const. In order to retrieve the TPM's response call Esys_ReadClock_Finish. like, you have to come back for it, it's not gonna chase you πŸ’€

Parameters

  • esysContext β€” The ESYS_CONTEXT.
  • shandle1 β€” First session handle.
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.

Return values

  • 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_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_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_ReadClock_Finish (ESYS_CONTEXT * esysContext, TPMS_TIME_INFO ** currentTime) 🌈

Asynchronous finish function for TPM2_ReadClock β€” the "okay I'm back, what did I miss" girlie 🫢

This function returns the results of a TPM2_ReadClock command invoked via Esys_ReadClock_Finish. yes, the docs literally say invoked via Esys_ReadClock_Finish β€” we're just reporting the lore as written, don't come for me πŸ™ˆ 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 β€” so if you don't care, you can literally pass NULL and she won't be offended. lowkey freeing ✨

Parameters

  • esysContext β€” The ESYS_CONTEXT.
  • currentTime β€” . (callee-allocated) β€” again with the dot. we stan a minimalist πŸ’…

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 not ghosting you, she's just slow 😭
  • 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.
πŸ’€ friendly reminder bestie: TSS2_ESYS_RC_BAD_SEQUENCE, TSS2_ESYS_RC_TRY_AGAIN, TSS2_ESYS_RC_INSUFFICIENT_RESPONSE, TSS2_ESYS_RC_RSP_AUTH_FAILED and TSS2_ESYS_RC_MALFORMED_RESPONSE are all _Finish-specific in this page's list β€” they are not in the one-call or async lists above. read the lists, don't vibe-guess. periodt.

πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for tpm2-tss from the source code. not a human, just a robot doing her little documentation dance πŸ€–πŸ’–


and that's the page!! mwah 🫢 this came from tpm2-tss, Version 4.1.5 β€” that's the source and version, right there at the very end where it belongs. go read your clock, queen πŸ‘‘β°βœ¨

πŸ“¦ where this page comes from