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

Functions

TSS2_RC Fapi_VerifySignature (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)
 
TSS2_RC Fapi_VerifySignature_Async (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)
 
TSS2_RC Fapi_VerifySignature_Finish (FAPI_CONTEXT *context)
 

Detailed Description

FAPI functions to invoke VerifySignature either as one-call or in an asynchronous manner.

Function Documentation

◆ Fapi_VerifySignature()

Fapi_VerifySignature ( FAPI_CONTEXT context,
char const *  keyPath,
uint8_t const *  digest,
size_t  digestSize,
uint8_t const *  signature,
size_t  signatureSize 
)

One-Call function for Fapi_VerifySignature

Verifies a signature using a public key found in a keyPath.

Parameters
[in,out]contextThe FAPI_CONTEXT
[in]keyPathThe path to the verification public key
[in]digestThe that was signed. Must be already hashed
[in]digestSizethe size of digest in bytes
[in]signatureThe signature to be verified
[in]signatureSizeThe size of signature in bytes
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif context, keyPath, signature, or digest is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_KEY_NOT_FOUNDif keyPath does not map to a FAPI object.
TSS2_FAPI_RC_BAD_KEYif the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation.
TSS2_FAPI_RC_BAD_VALUEif signature is invalid (has the wrong format) or if digestSize is zero.
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILEDif the signature fails to verify.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.
TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.
TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.
TSS2_FAPI_RC_TRY_AGAINif an I/O operation is not finished yet and this function needs to be called again.
TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.
TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.
TSS2_FAPI_RC_BAD_PATHif the path is used in inappropriate context or contains illegal characters.

◆ Fapi_VerifySignature_Async()

Fapi_VerifySignature_Async ( FAPI_CONTEXT context,
char const *  keyPath,
uint8_t const *  digest,
size_t  digestSize,
uint8_t const *  signature,
size_t  signatureSize 
)

Asynchronous function for Fapi_VerifySignature

Verifies a signature using a public key found in a keyPath.

Call Fapi_VerifySignature_Finish to finish the execution of this command.

Parameters
[in,out]contextThe FAPI_CONTEXT
[in]keyPathThe path to the verification public key
[in]digestThe that was signed. Must be already hashed
[in]digestSizethe size of digest in bytes
[in]signatureThe signature to be verified
[in]signatureSizeThe size of signature in bytes
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif context, keyPath, signature, or digest is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_KEY_NOT_FOUNDif keyPath does not map to a FAPI object.
TSS2_FAPI_RC_BAD_KEYif the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation.
TSS2_FAPI_RC_BAD_VALUEif signature is invalid (has the wrong format) or if digestSize is zero.
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILEDif the signature fails to verify.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.
TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.
TSS2_FAPI_RC_PATH_NOT_FOUNDif a FAPI object path was not found during authorization.
TSS2_FAPI_RC_NOT_PROVISIONEDFAPI was not provisioned.
TSS2_FAPI_RC_BAD_PATHif the path is used in inappropriate context or contains illegal characters.

◆ Fapi_VerifySignature_Finish()

Fapi_VerifySignature_Finish ( FAPI_CONTEXT context)

Asynchronous finish function for Fapi_VerifySignature

This function should be called after a previous Fapi_VerifySignature_Async.

Parameters
[in,out]contextThe FAPI_CONTEXT
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif context is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.
TSS2_FAPI_RC_IO_ERRORif the data cannot be saved.
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.
TSS2_FAPI_RC_TRY_AGAINif the asynchronous operation is not yet complete. Call this function again later.
TSS2_FAPI_RC_GENERAL_FAILUREif an internal error occurred.
TSS2_FAPI_RC_BAD_VALUEif an invalid value was passed into the function.
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILEDif the signature could not be verified