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 β€” the ESYS_CONTEXT.
  • authHandle β€” TPM2_RH_PLATFORM+{PP}.
  • shandle1 β€” session handle for authorization of authHandle.
  • shandle2 β€” second session handle.
  • shandle3 β€” third session handle.
  • authPolicy β€” the desired authPolicy.
  • 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 the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption 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 the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type, or if required ESYS_TR objects are ESYS_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_RCs produced 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 β€” the ESYS_CONTEXT.
  • authHandle β€” TPM2_RH_PLATFORM+{PP}.
  • shandle1 β€” session handle for authorization of authHandle.
  • shandle2 β€” second session handle.
  • shandle3 β€” third session handle.
  • authPolicy β€” the desired authPolicy.
  • 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 the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption 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 the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type, or if required ESYS_TR objects are ESYS_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 β€” the ESYS_CONTEXT.

🌈 Return values

  • TSS2_RC_SUCCESS β€” on success ✨
  • ESYS_RC_SUCCESS β€” if the function call was a success.
  • TSS2_ESYS_RC_BAD_REFERENCE β€” if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT β€” if esysContext corruption 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_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 πŸ€–βœ¨ (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