tpm2-tss  master
TPM Software stack 2.0 TCG spec compliant implementation
Fapi_SetSignCB

Typedefs

typedef TSS2_RC(* Fapi_CB_Sign) (char const *objectPath, char const *description, char const *publicKey, char const *publicKeyHint, uint32_t hashAlg, uint8_t const *dataToSign, size_t dataToSignSize, uint8_t const **signature, size_t *signatureSize, void *userData)
 
typedef TSS2_RC(* Fapi_CB_PolicyAction) (char const *objectPath, char const *action, void *userData)
 

Functions

TSS2_RC Fapi_SetSignCB (FAPI_CONTEXT *context, Fapi_CB_Sign callback, void *userData)
 
TSS2_RC Fapi_SetPolicyActionCB (FAPI_CONTEXT *context, Fapi_CB_PolicyAction callback, void *userData)
 

Detailed Description

FAPI functions to invoke SetSignCB.

Function Documentation

◆ Fapi_SetPolicyActionCB()

Fapi_SetPolicyActionCB ( FAPI_CONTEXT context,
Fapi_CB_PolicyAction  callback,
void *  userData 
)

Fapi_SetActionCB() registers an application-defined function as a callback that shall be called back upon encountering a policy action element.

Parameters
[in,out]contextThe FAPI_CONTEXT
[in]callbackThe callback function for branch selection
[in]userDataA pointer that is provided to all callback invocations
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif the context is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.
TSS2_FAPI_RC_BAD_SEQUENCEif the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding.
TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.

◆ Fapi_SetSignCB()

Fapi_SetSignCB ( FAPI_CONTEXT context,
Fapi_CB_Sign  callback,
void *  userData 
)

Fapi_SetSignCB() registers an application-defined function as a callback to allow the FAPI to get signatures authorizing use of TPM objects.

Parameters
[in,out]contextThe FAPI_CONTEXT
[in]callbackThe callback function for signing selection
[in]userDataA pointer that is provided to all callback invocations
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif the context is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.
TSS2_FAPI_RC_BAD_SEQUENCEif the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding.
TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.