mbedtls_pkcs7_signed_data_verify() function
Verification of PKCS #7 signature against a caller-supplied certificate. For each signer in the PKCS structure, this function computes a signature over the supplied data, using the supplied certificate and the same digest algorithm as specified by the signer. It then compares this signature against the signer's signature; verification succeeds if any comparison matches. This function does not use the certificates held within the PKCS #7 structure itself, and does not check that the certificate is signed by a trusted certification authority.
Arguments
pkcs7
mbedtls_pkcs7 structure containing signature.
cert
Certificate containing key to verify signature.
data
Plain data on which signature has to be verified.
datalen
Length of the data.
Return value
0 if the signature verifies, or a negative error code on failure.
Notes
This function internally calculates the hash on the supplied plain data for signature verification.
mbedtls_pkcs7_signed_data_verify() calls 1 function:
![]()
mbedtls_pkcs7_signed_data_verify()
mbedtls_pkcs7_signed_data_verify():
![]()
mbedtls_pkcs7_signed_data_verify()