Esys_PCR_Event(3)
β¨ Esys_PCR_Event(3) β the TPM2_PCR_Event ESAPI glow-up β¨
okay bestie, so this is a manual page from the Library Functions Manual (iykyk, it's the tpm2-tss library) and it's literally all about Esys_PCR_Event β the ESAPI function that invokes the TPM2_PCR_Event command. no cap, this is the group chat where PCR handles get their event data hashed. let's get into it π
πΈ NAME πΈ
Esys_PCR_Event β the ESAPI function for the TPM2_PCR_Event command. that's it, that's the vibe. π
π¦ SYNOPSIS π¦
here's the function family, bestie β three functions, all iconic:
TSS2_RC Esys_PCR_Event_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT *eventData)
TSS2_RC Esys_PCR_Event (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT *eventData, TPML_DIGEST_VALUES **digests)
TSS2_RC Esys_PCR_Event_Finish (ESYS_CONTEXT *esysContext, TPML_DIGEST_VALUES **digests)
π Detailed Description π
okay so this is the ESAPI function that invokes the TPM2_PCR_Event command either as a one-call or in an asynchronous manner. literally choose your fighter. π₯
π Function Documentation π
π TSS2_RC Esys_PCR_Event (...) π
the one-call function for TPM2_PCR_Event β the main character energy version π
so real talk: this function invokes the TPM2_PCR_Event command in a one-call variant. that means it will block until the TPM response is available. all input parameters are const. the memory for non-simple output parameters is allocated by the function implementation. no cap, it handles the memory for you. π«Ά
here's the full signature so you can copy-paste into your code:
TSS2_RC Esys_PCR_Event (ESYS_CONTEXT * esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT * eventData, TPML_DIGEST_VALUES ** digests)
π Parameters π
esysContextβ TheESYS_CONTEXT. your whole context bestie.pcrHandleβ Handle of the PCR. the actual PCR we're doing stuff to.shandle1β Session handle for authorization ofpcrHandle. auth slay.shandle2β Second session handle.shandle3β Third session handle.eventDataβ Event data in sized buffer. the tea being hashed.digestsβ (callee-allocated). the output, allocated for you by the callee, periodt.
π Return values π
like, here's every possible mood this function could come back in:
TSS2_RC_SUCCESSβ if the function call was a success. we love a happy ending πTSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL. bestie, no.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption is detected. red flag π©TSS2_ESYS_RC_MEMORYβ if the ESAPI cannot allocate enough memory for internal operations or return parameters. not enough room for the drama.TSS2_ESYS_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending. one thing at a time, babe.TSS2_ESYS_RC_INSUFFICIENT_RESPONSEβ if the TPM's response does not at least contain the tag, response length, and response code. like a text with no context.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. the vibes were off.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSβ if more than one session has the'decrypt'attribute bit set. one decrypt session max, greedy.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSβ if more than one session has the'encrypt'attribute bit set. same energy.TSS2_ESYS_RC_BAD_TRβ if any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_TR_NONE. check your TRs bestie.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. not supported, soz.TSS2_RCsβ produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. the lower layers said what they said.
π TSS2_RC Esys_PCR_Event_Async (...) π
the asynchronous function for TPM2_PCR_Event β the "send it and dip" version π
this function invokes the TPM2_PCR_Event command in an asynchronous variant. meaning it 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_PCR_Event_Finish. don't forget to finish, bestie, it's not a vibe to leave things hanging.
here's the signature, lowkey:
TSS2_RC Esys_PCR_Event_Async (ESYS_CONTEXT * esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT * eventData)
π Parameters π
esysContextβ TheESYS_CONTEXT. still the context, still iconic.pcrHandleβ Handle of the PCR.shandle1β Session handle for authorization ofpcrHandle.shandle2β Second session handle.shandle3β Third session handle.eventDataβ Event data in sized buffer.
π Return values π
ESYS_RC_SUCCESSβ if the function call was a success. note: this one saysESYS_RC_SUCCESS, notTSS2_RC_SUCCESSβ copy it exactly, don't @ me.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_BAD_TRβ if any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_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_Event_Finish (...) π§
the asynchronous finish function for TPM2_PCR_Event β the and that's on periodt closure π¬
this function returns the results of a TPM2_PCR_Event command invoked via Esys_PCR_Event_Finish. 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. waste not, want not, bestie. β¨
here's the signature:
TSS2_RC Esys_PCR_Event_Finish (ESYS_CONTEXT * esysContext, TPML_DIGEST_VALUES ** digests)
π Parameters π
esysContextβ TheESYS_CONTEXT.digestsβ (callee-allocated). the results, allocated for you, no stress.
π Return values π
TSS2_RC_SUCCESSβ on success.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_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. literally try again, it's giving patience.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. not a human author, a whole robot doing its thing. we respect it. π€
okay bestie, that's the whole page β tpm2-tss Version 4.1.5, the Esys_PCR_Event(3) manual, and honestly? it ate. go hash those events and slay π
β¨π
π¦ 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