(PHP 8)
openssl_cms_verify — Verify a CMS signature
openssl_cms_verify( string $input_filename, int $flags = 0, ?string $certificates = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME ): bool
This function verifies a CMS signature, either attached or detached, with the specified encoding.
input_filenameThe input file.
flagsFlags to pass to cms_verify().
certificatesA file with the signer certificate and optionally intermediate certificates.
ca_infoAn array containing self-signed certificate authority certificates.
untrusted_certificates_filenameA file containing additional intermediate certificates.
contentA file pointing to the content when signatures are detached.
pk7sigfileA file to save the signature to.
encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.openssl-cms-verify.php