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β TheESYS_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 theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption 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β TheESYS_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 theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption 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β TheESYS_CONTEXT.currentTimeβ . (callee-allocated) β again with the dot. we stan a minimalist π
Return values
TSS2_RC_SUCCESSβ on successESYS_RC_SUCCESSβ if the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption 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_FAILEDandTSS2_ESYS_RC_MALFORMED_RESPONSEare 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
- 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