Esys_PolicyGetDigest(3)
NAME π
Esys_PolicyGetDigest β the ESAPI function for the TPM2_PolicyGetDigest command. That's it, that's the vibe. π
SYNOPSIS β¨
Okay so the whole squad of functions you get is exactly these three, written out character-for-character so you can't mess 'em up:
TSS2_RC Esys_PolicyGetDigest_Async (ESYS_CONTEXT *esysContext, ESYS_TR
policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyGetDigest (ESYS_CONTEXT *esysContext, ESYS_TR
policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
TPM2B_DIGEST **policyDigest)
TSS2_RC Esys_PolicyGetDigest_Finish (ESYS_CONTEXT *esysContext,
TPM2B_DIGEST **policyDigest)
DETAILED DESCRIPTION π
So basically Esys_PolicyGetDigest is your ESAPI function that lets you invoke the TPM2_PolicyGetDigest command. And you've got two whole modes, bestie: either as a one-call (blocking, simple, iconic) or in an asynchronous manner (send it and dip, main character energy). Pick your fighter. π₯β¨
FUNCTION DOCUMENTATION π¦
TSS2_RC Esys_PolicyGetDigest (ESYS_CONTEXT * esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_DIGEST ** policyDigest) π
One-Call function for TPM2_PolicyGetDigest
This one invokes the TPM2_PolicyGetDigest command in its one-call variant. Translation: the function will block until the TPM response is ready β no ghosting, it waits for the reply. π
Also, all input parameters are const (so nobody's out here mutating your stuff), and the memory for non-simple output parameters is allocated by the function implementation. Not your problem, bestie, they handle it. π«Ά
Parameters π
esysContextβ TheESYS_CONTEXT. The holder of the whole ESAPI vibe.policySessionβ Handle for the policy session.shandle1β First session handle.shandle2β Second session handle.shandle3β Third session handle.policyDigestβ The current value of thepolicySession->policyDigest. (callee-allocated β meaning the function's side does the allocating, slay.)
Return values β
TSS2_RC_SUCCESSβ if the function call was a success. We love a win. πTSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption is detected. Ruh-roh. π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 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.TSS2_ESYS_RC_MALFORMED_RESPONSEβ if the TPM's response is corrupted. Not the serve we wanted. πTSS2_ESYS_RC_RSP_AUTH_FAILEDβ if the response HMAC from the TPM did not verify. Auth said no. πTSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSβ if more than one session has the'decrypt'attribute bit set. Two is too many, pick one. β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. Identity crisis, lowkey.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_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. The stack does not filter, periodt. π
TSS2_RC Esys_PolicyGetDigest_Async (ESYS_CONTEXT * esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3) π
Asynchronous function for TPM2_PolicyGetDigest
This one invokes the TPM2_PolicyGetDigest command in its asynchronous variant. Meaning: it returns as soon as the command has been sent downwards the stack to the TPM β it does not wait around. It dips. π
All input parameters are const, as always. And when you actually want the TPM's response, you gotta call Esys_PolicyGetDigest_Finish. That's the whole tradeoff. π―
Parameters πΈ
esysContextβ TheESYS_CONTEXT.policySessionβ Handle for the policy session.shandle1β First session handle.shandle2β Second session handle.shandle3β Third session handle.
Return values π₯
ESYS_RC_SUCCESSβ if the function call was a success. (Yes bestie, the original literally saysESYS_RC_SUCCESShere β I'm not fixing it, that's what it says.)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_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. (This one appears loud and early in the list, no cap.)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_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_RC Esys_PolicyGetDigest_Finish (ESYS_CONTEXT * esysContext, TPM2B_DIGEST ** policyDigest) π§
Asynchronous finish function for TPM2_PolicyGetDigest
This function returns the results of a TPM2_PolicyGetDigest command invoked via... okay so the original text literally says "invoked via Esys_PolicyGetDigest_Finish" right here β I'm keeping it exactly, even though the vibe is that you'd pair it with the Async one. Manpage says what manpage says. π€·ββοΈ
All non-simple output parameters are allocated by the function's implementation. And here's a cute one: NULL can be passed for every output parameter if the value is not required. Not needed? Just pass NULL and move on, queen. π
Parameters πΊ
esysContextβ TheESYS_CONTEXT.policyDigestβ The current value of thepolicySession->policyDigest. (callee-allocated)
Return values π
TSS2_RC_SUCCESSβ on success.ESYS_RC_SUCCESSβ if the function call was a success. (Yup, both success lines are here in the original β all the details, bestie. π)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. Not a fail, just a "maybe 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_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
AUTHOR π
So like, this entire page was generated automatically by Doxygen for tpm2-tss from the source code. No human wrote it, it just spawned like that. Iconic, honestly. β¨
Okay bestie, that's the whole page! Brought to you by tpm2-tss, Version 4.1.5 β slay forever, and remember: always check your return codes. π«Άπβ¨
π¦ 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