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β theFAPI_CONTEXTpathβ the path of the entity to be associated with the certificatex509certDataβ the certificate that is associated with the entity. plot twist: if this isNULL, an existing certificate will be removed from the entity. soNULLhere 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β ifcontextorpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_KEY_NOT_FOUNDβ ifpathdoes not map to a FAPI entity.TSS2_FAPI_RC_BAD_KEYβ ifx509certDatais 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β theFAPI_CONTEXTpathβ the path of the entity to be associated with the certificatex509certDataβ the certificate that is associated with the entity. if this isNULLan existing certificate will be removed from the entity (yes, sameNULL= remove situation as above, no cap)
Return values
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontextorpathisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_KEY_NOT_FOUNDβ ifpathdoes not map to a FAPI entity.TSS2_FAPI_RC_BAD_KEYβ ifx509certDatais 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β theFAPI_CONTEXT
Return values
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontextisNULL.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
- 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