Esys_PCR_SetAuthPolicy(3)
π Esys_PCR_SetAuthPolicy β¨
ok so this is a page from the tpm2-tss Library Functions Manual, and today's main character is Esys_PCR_SetAuthPolicy π
πΈ NAME πΈ
Esys_PCR_SetAuthPolicy β the ESAPI function for the TPM2_PCR_SetAuthPolicy command. that's it, that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
π§ Functions
TSS2_RC Esys_PCR_SetAuthPolicy_Async (ESYS_CONTEXT *esysContext, ESYS_TR
authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR
pcrNum)
TSS2_RC Esys_PCR_SetAuthPolicy (ESYS_CONTEXT *esysContext, ESYS_TR
authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR
pcrNum)
TSS2_RC Esys_PCR_SetAuthPolicy_Finish (ESYS_CONTEXT *esysContext)
like, three functions, one job. slay β¨
π Detailed Description π
it's an ESAPI function that invokes the TPM2_PCR_SetAuthPolicy command β and bestie you get to pick: either as a one-call situation or in an asynchronous manner. your choice, your era π
π₯ Function Documentation π₯
β TSS2_RC Esys_PCR_SetAuthPolicy (ESYS_CONTEXT * esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST * authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR pcrNum)
One-Call function for TPM2_PCR_SetAuthPolicy π
this one invokes the TPM2_PCR_SetAuthPolicy command in a one-call variant, meaning the function will literally block until the TPM response is available π΄ no cap, it just sits there. all input parameters are const. the memory for non-simple output parameters is allocated by the function implementation β not your problem, she handles it π
π Parameters
esysContextβ theESYS_CONTEXT.authHandleβTPM2_RH_PLATFORM+{PP}.shandle1β session handle for authorization ofauthHandle.shandle2β second session handle.shandle3β third session handle.authPolicyβ the desiredauthPolicy.hashAlgβ the hash algorithm of the policy.pcrNumβ the PCR for which the policy is to be set.
π Return values
TSS2_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_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_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_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally β iykyk π
π¦ TSS2_RC Esys_PCR_SetAuthPolicy_Async (ESYS_CONTEXT * esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST * authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR pcrNum)
Asynchronous function for TPM2_PCR_SetAuthPolicy π¦
this one invokes the TPM2_PCR_SetAuthPolicy command in an asynchronous variant. translation: 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. in order to actually retrieve the TPM's response, call Esys_PCR_SetAuthPolicy_Finish. bestie, don't forget the finish step, that's the whole point π«Ά
π Parameters
esysContextβ theESYS_CONTEXT.authHandleβTPM2_RH_PLATFORM+{PP}.shandle1β session handle for authorization ofauthHandle.shandle2β second session handle.shandle3β third session handle.authPolicyβ the desiredauthPolicy.hashAlgβ the hash algorithm of the policy.pcrNumβ the PCR for which the policy is to be set.
π 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_RCsproduced 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_SetAuthPolicy_Finish (ESYS_CONTEXT * esysContext)
Asynchronous finish function for TPM2_PCR_SetAuthPolicy π
this returns the results of a TPM2_PCR_SetAuthPolicy command invoked via Esys_PCR_SetAuthPolicy_Finish. all non-simple output parameters are allocated by the function's implementation. and the cute part: NULL can be passed for every output parameter if the value is not required β very low-maintenance of you π
π Parameters
esysContextβ theESYS_CONTEXT.
π 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 β³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 π
generated automatically by Doxygen for tpm2-tss from the source code π€β¨ (yes, a robot wrote the original, and now i'm the one translating it into feelings, we love a glow-up)
π okay that's the whole page bestie, go set some PCR auth policies and be iconic about it. no cap, you got this π
with love from the tpm2-tss girlies πΈ β Version 4.1.5 of the tpm2-tss docs, Esys_PCR_SetAuthPolicy(3), page complete, mwah π
π¦ 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