Esys_PolicyTicket(3)
π Esys_PolicyTicket(3) β the ESAPI glow-up for TPM2_PolicyTicket π
okay bestie, so this is a page from the tpm2-tss library manual, and it's literally all about Esys_PolicyTicket β the ESAPI function that lets you invoke the TPM2_PolicyTicket command. she's giving very much "security middleware main character energy" and honestly? we're obsessed. π
β¨ NAME β¨
Esys_PolicyTicket β the ESAPI function for the TPM2_PolicyTicket command. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
π¦ Functions
TSS2_RC Esys_PolicyTicket_Async (ESYS_CONTEXT *esysContext, ESYS_TR
policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_TIMEOUT *timeout, const TPM2B_DIGEST *cpHashA, const
TPM2B_NONCE *policyRef, const TPM2B_NAME *authName, const TPMT_TK_AUTH
*ticket)
TSS2_RC Esys_PolicyTicket (ESYS_CONTEXT *esysContext, ESYS_TR
policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_TIMEOUT *timeout, const TPM2B_DIGEST *cpHashA, const
TPM2B_NONCE *policyRef, const TPM2B_NAME *authName, const TPMT_TK_AUTH
*ticket)
TSS2_RC Esys_PolicyTicket_Finish (ESYS_CONTEXT *esysContext)
three whole functions, no cap. one-call, async, and the finish that wraps it up. π«Ά
π Detailed Description π
so basically, this is the ESAPI function to invoke the TPM2_PolicyTicket command either as a one-call or in an asynchronous manner. that's the whole tea. ββ¨
π Function Documentation π
β TSS2_RC Esys_PolicyTicket (ESYS_CONTEXT * esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_TIMEOUT * timeout, const TPM2B_DIGEST * cpHashA, const TPM2B_NONCE * policyRef, const TPM2B_NAME * authName, const TPMT_TK_AUTH * ticket)
π« One-Call function for TPM2_PolicyTicket
this one is the one-call variant, bestie β meaning it invokes the TPM2_PolicyTicket command and blocks until the TPM response is available. yeah, she waits. patient queen. π
all input parameters are const, and the memory for non-simple output parameters is allocated by the function implementation. iconic behavior honestly.
πΈ Parameters
esysContextβ TheESYS_CONTEXT. the whole context of the situation, iykyk.policySessionβ Handle for the policy session being extended. she's getting longer, fr fr.shandle1β First session handle.shandle2β Second session handle.shandle3β Third session handle.timeoutβ Time when authorization will expire. clock is ticking bestie β°cpHashAβ Digest of the command parameters to which this authorization is limited.policyRefβ Reference to a qualifier for the policy β may be the Empty Buffer. lowkey flexible.authNameβ Name of the object that provided the authorization.ticketβ An authorization ticket returned by the TPM in response to aTPM2_PolicySigned()orTPM2_PolicySecret().
π Return values
TSS2_RC_SUCCESSif the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_MALFORMED_RESPONSEif the TPM's response is corrupted.TSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif 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_PARAMif 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_PolicyTicket_Async (ESYS_CONTEXT * esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_TIMEOUT * timeout, const TPM2B_DIGEST * cpHashA, const TPM2B_NONCE * policyRef, const TPM2B_NAME * authName, const TPMT_TK_AUTH * ticket)
π Asynchronous function for TPM2_PolicyTicket
the async girlie of the group! this invokes the TPM2_PolicyTicket command in an asynchronous variant, meaning the function returns as soon as the command has been sent downwards the stack to the TPM β she does not wait around, she has places to be. π¦ all input parameters are const. and to actually retrieve the TPM's response you gotta call Esys_PolicyTicket_Finish, okay? don't leave her hanging.
πΈ Parameters
esysContextβ TheESYS_CONTEXT.policySessionβ Handle for the policy session being extended.shandle1β First session handle.shandle2β Second session handle.shandle3β Third session handle.timeoutβ Time when authorization will expire.cpHashAβ Digest of the command parameters to which this authorization is limited.policyRefβ Reference to a qualifier for the policy β may be the Empty Buffer.authNameβ Name of the object that provided the authorization.ticketβ An authorization ticket returned by the TPM in response to aTPM2_PolicySigned()orTPM2_PolicySecret().
π Return values
ESYS_RC_SUCCESSif the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif 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_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif 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_PARAMif one of the sessions has the'encrypt'attribute set and the command does not support encryption of the first response parameter.
π§ TSS2_RC Esys_PolicyTicket_Finish (ESYS_CONTEXT * esysContext)
π₯ Asynchronous finish function for TPM2_PolicyTicket
the grand finale!! π¬ this returns the results of a TPM2_PolicyTicket command invoked via Esys_PolicyTicket_Finish. yes, the manpage literally says Esys_PolicyTicket_Finish there β we're keeping it exactly as written, don't come for me. all non-simple output parameters are allocated by the function's implementation, and NULL can be passed for every output parameter if the value is not required. so chill, you don't have to want everything.
πΈ Parameters
esysContextβ TheESYS_CONTEXT.
π Return values
TSS2_RC_SUCCESSon successESYS_RC_SUCCESSif the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_ESYS_RC_TRY_AGAINif the timeout counter expires before the TPM response is received.TSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MALFORMED_RESPONSEif 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 no human wrote this one β the robot did it, and honestly it ate. π€π
heads up bestie: this page is auto-generated documentation, so treat the source code as the real authority. no invented lore here, just what's on the page. π«Ά
and that's the whole page!! π mwah π β this lil manual moment came to you from tpm2-tss, Version 4.1.5, dated alongside Esys_PolicyTicket(3). go forth and extend those policy sessions, 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