Fapi_VerifySignature
Feature API

## 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()

TSS2_RC 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] | context | The FAPI_CONTEXT
  [in] | keyPath | The path to the verification public key
  [in] | digest | The that was signed. Must be already hashed
  [in] | digestSize | the size of digest in bytes
  [in] | signature | The signature to be verified
  [in] | signatureSize | The size of signature in bytes

Return values

  TSS2_RC_SUCCESS | if the function call was a success.
  TSS2_FAPI_RC_BAD_REFERENCE | if context, keyPath, signature, or digest is NULL.
  TSS2_FAPI_RC_BAD_CONTEXT | if context corruption is detected.
  TSS2_FAPI_RC_KEY_NOT_FOUND | if keyPath does not map to a FAPI object.
  TSS2_FAPI_RC_BAD_KEY | if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation.
  TSS2_FAPI_RC_BAD_VALUE | if signature is invalid (has the wrong format) or if digestSize is zero.
  TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED | if the signature fails to verify.
  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_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_NOT_PROVISIONED | FAPI was not provisioned.
  TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters.

## Fapi_VerifySignature_Async()

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 )

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] | context | The FAPI_CONTEXT
  [in] | keyPath | The path to the verification public key
  [in] | digest | The that was signed. Must be already hashed
  [in] | digestSize | the size of digest in bytes
  [in] | signature | The signature to be verified
  [in] | signatureSize | The size of signature in bytes

Return values

  TSS2_RC_SUCCESS | if the function call was a success.
  TSS2_FAPI_RC_BAD_REFERENCE | if context, keyPath, signature, or digest is NULL.
  TSS2_FAPI_RC_BAD_CONTEXT | if context corruption is detected.
  TSS2_FAPI_RC_KEY_NOT_FOUND | if keyPath does not map to a FAPI object.
  TSS2_FAPI_RC_BAD_KEY | if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation.
  TSS2_FAPI_RC_BAD_VALUE | if signature is invalid (has the wrong format) or if digestSize is zero.
  TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED | if the signature fails to verify.
  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_NOT_PROVISIONED | FAPI was not provisioned.
  TSS2_FAPI_RC_BAD_PATH | if the path is used in inappropriate context or contains illegal characters.

## Fapi_VerifySignature_Finish()

TSS2_RC 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] | 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_BAD_VALUE | if an invalid value was passed into the function.
  TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED | if the signature could not be verified