Fapi_AuthorizePolicy(3)

🌸 NAME 🌸

Fapi_AuthorizePolicy β€” Fapi_AuthorizePolicy (yes bestie, that's the whole name section, no cap ✨).

Okay so this is Fapi_AuthorizePolicy(3), from the Library Functions Manual, and it's about authorizing policies in FAPI. Iconic behavior only πŸ’….


✨ SYNOPSIS ✨

Functions

TSS2_RC Fapi_AuthorizePolicy (FAPI_CONTEXT *context, char const
    *policyPath, char const *keyPath, uint8_t const *policyRef, size_t
    policyRefSize)

TSS2_RC Fapi_AuthorizePolicy_Async (FAPI_CONTEXT *context, char const
    *policyPath, char const *keyPath, uint8_t const *policyRef, size_t
    policyRefSize)

TSS2_RC Fapi_AuthorizePolicy_Finish (FAPI_CONTEXT *context)

Three little functions, one big authorization moment 🫢:

  • Fapi_AuthorizePolicy β€” the one-call version
  • Fapi_AuthorizePolicy_Async β€” the asynchronous starter
  • Fapi_AuthorizePolicy_Finish β€” the asynchronous finisher

πŸ’– Detailed Description πŸ’–

These are the FAPI functions that invoke AuthorizePolicy either as a one-call or in an asynchronous manner. Main character energy for real πŸ‘‘.


πŸ‘‘ Function Documentation πŸ‘‘

🫢 TSS2_RC Fapi_AuthorizePolicy β€” the one-call icon 🫢

TSS2_RC Fapi_AuthorizePolicy (FAPI_CONTEXT *context, char const *
    policyPath, char const *keyPath, uint8_t const *policyRef, size_t
    policyRefSize)

One-Call function for Fapi_AuthorizePolicy ✨.

If a current policy happens to be a PolicyAuthorize, then for it to be used, the user must first satisfy β€œa policy authorized by a having been signed (and made into a ticket) by an authorized party.” Yes, that's the phrasing β€” we keep the technical tea exactly as it is πŸ“.

Parameters

  • context β€” the FAPI context
  • policyPath β€” the path to the policy file
  • keyPath β€” the path to the signing key
  • policyRef β€” a byte buffer that is included in the signature. May be NULL
  • policyRefSize β€” the size of policyRef. Must be 0 if policyRef is NULL

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success πŸ’–
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, policyPath or keyPath is NULL
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath or keyPath does not map to a FAPI policy or key object
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters
  • TSS2_FAPI_RC_NO_TPM β€” if FAPI was initialized in no-TPM-mode via its config file
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function
  • TSS2_FAPI_RC_TRY_AGAIN β€” if an I/O operation is not finished yet and this function needs to be called again
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred
  • TSS2_FAPI_RC_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if a key was not found
  • TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN β€” if a required authorization callback is not set
  • TSS2_FAPI_RC_AUTHORIZATION_FAILED β€” if the authorization attempt fails
  • TSS2_FAPI_RC_POLICY_UNKNOWN β€” if policy search for a certain policy digest was not successful
  • TSS2_ESYS_RC_* β€” possible error codes of ESAPI
  • TSS2_FAPI_RC_NOT_PROVISIONED β€” FAPI was not provisioned

πŸ¦‹ TSS2_RC Fapi_AuthorizePolicy_Async β€” the async starter πŸ¦‹

TSS2_RC Fapi_AuthorizePolicy_Async (FAPI_CONTEXT *context, char const *
    policyPath, char const *keyPath, uint8_t const *policyRef, size_t
    policyRefSize)

Asynchronous function for Fapi_AuthorizePolicy 🌈.

Same policy tea as above: if a current policy happens to be a PolicyAuthorize, then for it to be used, the user must first satisfy β€œa policy authorized by a having been signed (and made into a ticket) by an authorized party.” No skipping the lore 😌.

Call Fapi_AuthorizePolicy_Finish to finish the execution of this command.

Parameters

  • context β€” the FAPI context
  • policyPath β€” the path to the policy file
  • keyPath β€” the path to the signing key
  • policyRef β€” a byte buffer that is included in the signature. May be NULL
  • policyRefSize β€” the size of policyRef. Must be 0 if policyRef is NULL

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success πŸ’–
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, policyPath or keyPath is NULL
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected
  • TSS2_FAPI_RC_BAD_PATH β€” if policyPath or keyPath does not map to a FAPI policy or key object
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function
  • TSS2_FAPI_RC_NO_TPM β€” if FAPI was initialized in no-TPM-mode via its config file

🧚 TSS2_RC Fapi_AuthorizePolicy_Finish β€” the async finisher 🧚

TSS2_RC Fapi_AuthorizePolicy_Finish (FAPI_CONTEXT *context)

Asynchronous finish function for Fapi_AuthorizePolicy πŸŽ€.

This function should be called after a previous Fapi_AuthorizePolicy_Async. It's giving β€œfinish the quest” energy, bestie πŸ”₯.

Parameters

  • context β€” the FAPI_CONTEXT

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success πŸ’–
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context is NULL
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending
  • TSS2_FAPI_RC_IO_ERROR β€” if the data cannot be saved
  • TSS2_FAPI_RC_MEMORY β€” if the FAPI cannot allocate enough memory for internal operations or return parameters
  • TSS2_FAPI_RC_TRY_AGAIN β€” if the asynchronous operation is not yet complete. Call this function again later
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred
  • TSS2_FAPI_RC_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if a key was not found
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function
  • TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN β€” if a required authorization callback is not set
  • TSS2_FAPI_RC_AUTHORIZATION_FAILED β€” if the authorization attempt fails
  • TSS2_FAPI_RC_POLICY_UNKNOWN β€” if policy search for a certain policy digest was not successful
  • TSS2_ESYS_RC_* β€” possible error codes of ESAPI
  • TSS2_FAPI_RC_NOT_PROVISIONED β€” FAPI was not provisioned
  • TSS2_FAPI_RC_BAD_PATH β€” if the path is used in inappropriate context or contains illegal characters

πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for tpm2-tss from the source code. Very β€œthe build made this page itself” of it all πŸ’….


Later bestie πŸ’– β€” source is tpm2-tss, version 4.1.5. That's the cute sign-off version of the footer, folded in instead of copied, periodt 🫢✨

πŸ“¦ where this page comes from