PKCS7_verify(3) | LibreSSL | PKCS7_verify(3) |
NAME
PKCS7_verify, PKCS7_get0_signers - verify a PKCS#7 signedData structureSYNOPSIS
#include <openssl/pkcs7.h>
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags);
STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
DESCRIPTION
PKCS7_verify() verifies a PKCS#7 signedData structure. p7 is the PKCS7 structure to verify. certs is a set of certificates in which to search for the signer's certificate. store is a trusted certificate store (used for chain verification). indata is the signed data if the content is not present in p7 (that is it is detached). The content is written to out if it is not NULL.VERIFY PROCESS
Normally the verify process proceeds as follows.NOTES
One application of PKCS7_NOINTERN is to only accept messages signed by a small number of certificates. The acceptable certificates would be passed in the certs parameter. In this case if the signer is not one of the certificates supplied in certs then the verify will fail because the signer cannot be found.RETURN VALUES
PKCS7_verify() returns 1 for a successful verification and zero or a negative value if an error occurs.BUGS
The trusted certificate store is not searched for the signers certificate, this is primarily due to the inadequacies of the current X509_STORE functionality.SEE ALSO
ERR_get_error(3), PKCS7_sign(3)HISTORY
PKCS7_verify() was added to OpenSSL 0.9.52015-10-26 | LibreSSL |