Fapi_SetCertificate(3)

πŸ’… Fapi_SetCertificate(3) β€” Library Functions Manual πŸŽ€

okay bestie, so this one lives in the Library Functions Manual section and it's literally all about slapping an x509 cert onto a key. it's giving "certificate glow-up" energy and honestly? iconic. let's get into it ✨


🌸 NAME 🌸

Fapi_SetCertificate β€” like, the function itself, the main character πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole squad, bestie β€” the one-call version, the async starter, and the async finisher:

TSS2_RC Fapi_SetCertificate (FAPI_CONTEXT *context, char const *path,
    char const *x509certData)
TSS2_RC Fapi_SetCertificate_Async (FAPI_CONTEXT *context, char const *path,
    char const *x509certData)
TSS2_RC Fapi_SetCertificate_Finish (FAPI_CONTEXT *context)

✨ Detailed Description ✨

so basically these are the FAPI functions that invoke SetCertificate β€” and you can do it either as a one-call situation or in an asynchronous manner. pick your vibe, both are valid 🫢


πŸ’– Function Documentation πŸ’–

πŸŽ€ TSS2_RC Fapi_SetCertificate (FAPI_CONTEXT * context, char const * path, char const * x509certData)

one-call function for Fapi_SetCertificate. yes ma'am, one and done.

what it does: sets an x509 cert into the path of a key. literally just drops that cert where it belongs πŸ”₯

Parameters

  • context β€” the FAPI_CONTEXT
  • path β€” the path of the entity to be associated with the certificate
  • x509certData β€” the certificate that is associated with the entity. plot twist: if this is NULL, an existing certificate will be removed from the entity. so NULL here is a delete, not an "oops forgot it", ok? 🫣

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success. slay πŸ’…
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or path is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if path does not map to a FAPI entity.
  • TSS2_FAPI_RC_BAD_KEY β€” if x509certData is invalid.
  • TSS2_FAPI_RC_BAD_SEQUENCE β€” if the context has an asynchronous operation already pending. one thing at a time, bestie 😭
  • 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_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.
  • 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. it's giving "not yet bestie, come back" πŸŒ€
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred.
  • 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.

πŸ¦‹ TSS2_RC Fapi_SetCertificate_Async (FAPI_CONTEXT * context, char const * path, char const * x509certData)

asynchronous function for Fapi_SetCertificate. the "i'll get to it" version, but make it official ✨

what it does: sets an x509 cert into the path of a key. same mission, async delivery.

🫢 heads up: call Fapi_SetCertificate_Finish to finish the execution of this command. don't leave it hanging, that's rude.

Parameters

  • context β€” the FAPI_CONTEXT
  • path β€” the path of the entity to be associated with the certificate
  • x509certData β€” the certificate that is associated with the entity. if this is NULL an existing certificate will be removed from the entity (yes, same NULL = remove situation as above, no cap)

Return values

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or path is NULL.
  • TSS2_FAPI_RC_BAD_CONTEXT β€” if context corruption is detected.
  • TSS2_FAPI_RC_KEY_NOT_FOUND β€” if path does not map to a FAPI entity.
  • TSS2_FAPI_RC_BAD_KEY β€” if x509certData is invalid.
  • 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_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function.
  • 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.

πŸ’œ TSS2_RC Fapi_SetCertificate_Finish (FAPI_CONTEXT * context)

asynchronous finish function for Fapi_SetCertificate. the closing act, the final bow πŸ‘‘

this function should be called after a previous Fapi_SetCertificate_Async. like, that's the whole point bestie, don't skip it πŸ™ˆ

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. she's still cooking πŸ“
  • TSS2_FAPI_RC_GENERAL_FAILURE β€” if an internal error occurred.
  • TSS2_FAPI_RC_BAD_VALUE β€” if an invalid value was passed into the function.
  • TSS2_ESYS_RC_* β€” possible error codes of ESAPI.
  • TSS2_FAPI_RC_BAD_PATH β€” if the path is used in inappropriate context or contains illegal characters.
  • TSS2_FAPI_RC_PATH_NOT_FOUND β€” if a FAPI object path was not found during authorization.

🌈 Author 🌈

generated automatically by Doxygen for tpm2-tss from the source code. not me being auto-generated, that's just how it is 😭


and that's the whole page, bestie! stay certified πŸ’…βœ¨

tpm2-tss Β· Version 4.1.5 Β· Fapi_SetCertificate(3) β€” mwah, see you in the next manpage πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from