123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559 |
- .TH "fapi_crypto" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- fapi_crypto
- .SH SYNOPSIS
- .br
- .PP
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "TSS2_RC \fBget_crl_from_cert\fP (X509 *cert, X509_CRL **crl)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_cert_to_pem\fP (const uint8_t *certBuffer, size_t certBufferSize, char **pemCert, TPM2_ALG_ID *certAlgorithmId, TPM2B_PUBLIC *tpmPublic)"
- .br
- .ti -1c
- .RI "void \fBifapi_crypto_hash_abort\fP (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP **context)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_crypto_hash_finish\fP (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP **context, uint8_t *digest, size_t *digestSize)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_crypto_hash_start\fP (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP **context, TPM2_ALG_ID hashAlgorithm)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_crypto_hash_update\fP (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP *context, const uint8_t *buffer, size_t size)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_der_sig_to_tpm\fP (const TPMT_PUBLIC *tpmPublic, const unsigned char *signature, size_t signatureSize, TPMI_ALG_HASH hashAlgorithm, TPMT_SIGNATURE *tpmSignature)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_get_hash_alg_for_size\fP (uint16_t size, TPMI_ALG_HASH *hashAlgorithm)"
- .br
- .ti -1c
- .RI "TPM2_RC \fBifapi_get_profile_sig_scheme\fP (const \fBIFAPI_PROFILE\fP *profile, const TPMT_PUBLIC *tpmPublic, TPMT_SIG_SCHEME *signatureScheme)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_get_public_from_pem_cert\fP (const char *pem_cert, TPM2B_PUBLIC *tpm_public)"
- .br
- .ti -1c
- .RI "TPM2_ALG_ID \fBifapi_get_signature_algorithm_from_pem\fP (const char *pemKey)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_get_tpm2b_public_from_pem\fP (const char *pemKey, TPM2B_PUBLIC *tpmPublic)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_get_tpm_key_fingerprint\fP (const TPM2B_PUBLIC *tpmPublicKey, TPMI_ALG_HASH hashAlg, TPM2B_DIGEST *fingerprint)"
- .br
- .ti -1c
- .RI "size_t \fBifapi_hash_get_digest_size\fP (TPM2_ALG_ID hashAlgorithm)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_initialize_sign_public\fP (TPM2_ALG_ID signatureAlgorithm, TPM2B_PUBLIC *public)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_pub_pem_key_from_tpm\fP (const TPM2B_PUBLIC *tpmPublicKey, char **pemKey, int *pemKeySize)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_tpm_ecc_sig_to_der\fP (const TPMT_SIGNATURE *tpmSignature, uint8_t **signature, size_t *signatureSize)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_verify_ek_cert\fP (char *root_cert_pem, char *intermed_cert_pem, char *ek_cert_pem)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_verify_signature\fP (const \fBIFAPI_OBJECT\fP *keyObject, const uint8_t *signature, size_t signatureSize, const uint8_t *digest, size_t digestSize)"
- .br
- .ti -1c
- .RI "TSS2_RC \fBifapi_verify_signature_quote\fP (const \fBIFAPI_OBJECT\fP *keyObject, const uint8_t *signature, size_t signatureSize, const uint8_t *digest, size_t digestSize, const TPMT_SIG_SCHEME *signatureScheme)"
- .br
- .in -1c
- .SH "Detailed Description"
- .PP
- The types and functions used internally by FAPI for cryptographic operations\&. Multiple implementations of these functions for different cryptographic backends may exist\&.
- .SH "Function Documentation"
- .PP
- .SS "TSS2_RC get_crl_from_cert (X509 * cert, X509_CRL ** crl)"
- Get url to download crl from certificate\&.
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
- .br
- \fITSS2_FAPI_RC_NO_CERT\fP if an error did occur during certificate downloading\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_cert_to_pem (const uint8_t * certBuffer, size_t certBufferSize, char ** pemCert, TPM2_ALG_ID * certAlgorithmId, TPM2B_PUBLIC * tpmPublic)"
- Converts a TPM certificate buffer to the PEM format\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIcertBuffer\fP A byte buffer holding the certificate
- .br
- \fIcertBufferSize\fP The size of certBuffer in bytes
- .br
- \fIpemCert\fP A byte buffer where the PEM-formatted certificate is stored
- .br
- \fIcertAlgorithmId\fP The key type of the certified key
- .br
- \fItpmPublic\fP The public key of the certificate in TPM format\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if certBuffer or pemCert is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the certificate is invalid
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .RE
- .PP
- .SS "void ifapi_crypto_hash_abort (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP ** context)"
- Aborts a hash operation and finalizes the hash context\&. It will be set to NULL\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIcontext\fP The context of the digest object\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_crypto_hash_finish (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP ** context, uint8_t * digest, size_t * digestSize)"
- Gets the digest value from a hash context and closes it\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIcontext\fP The hash context that is released
- .br
- \fIdigest\fP The buffer for the digest value
- .br
- \fIdigestSize\fP The size of digest in bytes\&. Can be NULL
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if context or digest is NULL
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .RE
- .PP
- .SS "TSS2_RC ifapi_crypto_hash_start (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP ** context, TPM2_ALG_ID hashAlgorithm)"
- Starts the computation of a hash digest\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIcontext\fP The created hash context (callee-allocated)\&.
- .br
- \fIhashAlgorithm\fP The TSS hash identifier for the hash algorithm to use\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success\&.
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if hashAlgorithm is invalid
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if context is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory cannot be allocated
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .RE
- .PP
- .SS "TSS2_RC ifapi_crypto_hash_update (\fBIFAPI_CRYPTO_CONTEXT_BLOB\fP * context, const uint8_t * buffer, size_t size)"
- Updates the digest value of a hash object with data from a byte buffer\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIcontext\fP The hash context that will be updated
- .br
- \fIbuffer\fP The data for the update
- .br
- \fIsize\fP The size of data in bytes
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success\&.
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP for invalid parameters\&.
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .RE
- .PP
- .SS "TSS2_RC ifapi_der_sig_to_tpm (const TPMT_PUBLIC * tpmPublic, const unsigned char * signature, size_t signatureSize, TPMI_ALG_HASH hashAlgorithm, TPMT_SIGNATURE * tpmSignature)"
- Convert signature from DER to TPM format\&.
- .PP
- The signature in DER format is converted to TPM format to enable verification by the TPM\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fItpmPublic\fP The public information of the signature key
- .br
- \fIsignature\fP A byte buffer holding the DER encoded signature
- .br
- \fIsignatureSize\fP The size of signature in bytes
- .br
- \fIhashAlgorithm\fP The TSS identifier for the hash algorithm used to compute the digest
- .br
- \fItpmSignature\fP The signature in TPM format
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if tpmPublic, signature or tpmSignature is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_get_hash_alg_for_size (uint16_t size, TPMI_ALG_HASH * hashAlgorithm)"
- Returns a suitable hash algorithm for a given digest size\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIsize\fP The size of the digest
- .br
- \fIhashAlgorithm\fP A suitable hash algorithm for the digest size
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if hashAlgorithm is NULL
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the digest size is invalid
- .RE
- .PP
- .SS "TPM2_RC ifapi_get_profile_sig_scheme (const \fBIFAPI_PROFILE\fP * profile, const TPMT_PUBLIC * tpmPublic, TPMT_SIG_SCHEME * signatureScheme)"
- Returns the signature scheme that is currently used in the FAPI context\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIprofile\fP The FAPI profile from which the signing scheme is retrieved
- .br
- \fItpmPublic\fP The public key for which the signing key is fetched from the FAPI
- .br
- \fIsignatureScheme\fP The currently used signature scheme
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP if the signature scheme was successfully fetched
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if one of the parameters is NULL
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the key type is not TPM2_ALG_RSA or TPM2_ALG_ECC
- .RE
- .PP
- .SS "TSS2_RC ifapi_get_public_from_pem_cert (const char * pem_cert, TPM2B_PUBLIC * tpm_public)"
- Get public information for key of a pem certificate\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIpem_cert\fP The pem certificate\&.
- .br
- \fItpm_public\fP The public information of the key in TPM format\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the conversion fails\&.
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if openssl errors occur\&.
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
- .RE
- .PP
- .SS "TPM2_ALG_ID ifapi_get_signature_algorithm_from_pem (const char * pemKey)"
- Returns the TPM algorithm identifier that matches to the signature algorithm of a given PEM key\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIpemKey\fP The public key from which the signature algorithm is retrieved
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITPM2_ALG_RSA\fP if pemKey holds an RSA key
- .br
- \fITPM2_ALG_ECC\fP if pemKey holds an ECC key
- .br
- \fITPM2_ALG_ERROR\fP if the signature algorithm could not be determined
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_get_tpm2b_public_from_pem (const char * pemKey, TPM2B_PUBLIC * tpmPublic)"
- Gets an object with the TPM-relevant public information of a PEM encoded public key\&. The information is gathered from the key itself and the currently used FAPI profile\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIpemKey\fP A byte buffer holding the PEM encoded public key for which the public information is retrieved
- .br
- \fItpmPublic\fP The public information of pemKey
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if profile, pemKey or tpmPublic is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_get_tpm_key_fingerprint (const TPM2B_PUBLIC * tpmPublicKey, TPMI_ALG_HASH hashAlg, TPM2B_DIGEST * fingerprint)"
- Compute the fingerprint of a TPM public key\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fItpmPublicKey\fP The public key created by the TPM
- .br
- \fIhashAlg\fP The hash algorithm used for fingerprint computation\&.
- .br
- \fIfingerprint\fP The fingerprint digest\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_BAD_REFERENCE\fP if tpmPublicKey or pemKeySize are NULL
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .RE
- .PP
- .SS "size_t ifapi_hash_get_digest_size (TPM2_ALG_ID hashAlgorithm)"
- Returns the digest size of a given hash algorithm\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIhashAlgorithm\fP The TSS identifier of the hash algorithm
- .RE
- .PP
- \fBReturns:\fP
- .RS 4
- The size of the digest produced by the hash algorithm if hashAlgorithm is valid
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fI0\fP if hashAlgorithm is invalid
- .RE
- .PP
- .SS "TSS2_RC ifapi_initialize_sign_public (TPM2_ALG_ID signatureAlgorithm, TPM2B_PUBLIC * public)"
- Initializes a FAPI key template for a given signature algorithm\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIsignatureAlgorithm\fP The signature algorithm to use\&. Must be TPM2_ALG_RSA or TPM2_ALG_ECC
- .br
- \fIpublic\fP The template to initialize
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if template is NULL
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if signatureAlgorithm is not TPM2_ALG_RSA or TPM2_ALG_ECC
- .RE
- .PP
- .SS "TSS2_RC ifapi_pub_pem_key_from_tpm (const TPM2B_PUBLIC * tpmPublicKey, char ** pemKey, int * pemKeySize)"
- Convert a TPM public key into a PEM formatted byte buffer\&. This can be used by TLS libraries\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fItpmPublicKey\fP The public key created by the TPM
- .br
- \fIpemKey\fP A byte buffer that will hold the PEM representation of the public key (callee allocated)
- .br
- \fIpemKeySize\fP The size of pemKey in bytes
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_BAD_REFERENCE\fP if tpmPublicKey or pemKeySize are NULL
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_tpm_ecc_sig_to_der (const TPMT_SIGNATURE * tpmSignature, uint8_t ** signature, size_t * signatureSize)"
- Convert a TPM ECDSA signature into a DER formatted byte buffer\&. This can be used by TLS libraries\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fItpmSignature\fP The signature created by the TPM
- .br
- \fIsignature\fP A byte buffer that will hold the DER representation of the signature (callee allocated)
- .br
- \fIsignatureSize\fP The size of signature in bytes\&. May be NULL
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if tpmSignature is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .RE
- .PP
- .SS "TSS2_RC ifapi_verify_ek_cert (char * root_cert_pem, char * intermed_cert_pem, char * ek_cert_pem)"
- Verify EK certificate read from TPM\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIroot_cert_pem\fP The vendor root certificate\&.
- .br
- \fIintermed_cert_pem\fP The vendor intermediate certificate\&.
- .br
- \fIek_cert_pem\fP The ek certificate from TPM\&.
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the verification was no successful\&.
- .br
- \fITSS2_FAPI_RC_NO_CERT\fP if an error did occur during certificate downloading\&.
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if not enough memory can be allocated\&.
- .RE
- .PP
- .SS "TSS2_RC ifapi_verify_signature (const \fBIFAPI_OBJECT\fP * keyObject, const uint8_t * signature, size_t signatureSize, const uint8_t * digest, size_t digestSize)"
- Verifies a signature using a given FAPI public key\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIkeyObject\fP The FAPI public key used for verification
- .br
- \fIsignature\fP The signature to verify
- .br
- \fIsignatureSize\fP The size of signature in bytes
- .br
- \fIdigest\fP The digest of the signature
- .br
- \fIdigestSize\fP The size of digest in bytes
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP In case of success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if keyObject, signature or digest is NULL
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the type of the key is wrong
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED\fP if the verification of the signature fails
- .RE
- .PP
- .SS "TSS2_RC ifapi_verify_signature_quote (const \fBIFAPI_OBJECT\fP * keyObject, const uint8_t * signature, size_t signatureSize, const uint8_t * digest, size_t digestSize, const TPMT_SIG_SCHEME * signatureScheme)"
- Verifies the signature created by a Quote command\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIkeyObject\fP A FAPI key with which the signature is verified
- .br
- \fIsignature\fP A byte buffer holding the signature
- .br
- \fIsignatureSize\fP The size of signature in bytes
- .br
- \fIdigest\fP The digest of the signature
- .br
- \fIdigestSize\fP The size of digest in bytes
- .br
- \fIsignatureScheme\fP The signature scheme
- .RE
- .PP
- \fBReturn values:\fP
- .RS 4
- \fITSS2_RC_SUCCESS\fP on success
- .br
- \fITSS2_FAPI_RC_BAD_REFERENCE\fP if keyObject, signature, digest or signatureScheme is NULL
- .br
- \fITSS2_FAPI_RC_MEMORY\fP if memory could not be allocated
- .br
- \fITSS2_FAPI_RC_BAD_VALUE\fP if the PEM encoded key could not be decoded
- .br
- \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an error occurs in the crypto library
- .br
- \fITSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED\fP if the verification of the signature fails
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for tpm2-tss from the source code\&.
|