openssl_cms_sign Sign a file &reftitle.description; boolopenssl_cms_sign stringinput_filename stringoutput_filename OpenSSLCertificatestringcertificate OpenSSLAsymmetricKeyOpenSSLCertificatearraystringprivate_key arraynullheaders intflags0 intencodingOPENSSL_ENCODING_SMIME stringnulluntrusted_certificates_filename&null; This function signs a file with an X.509 certificate and key. &reftitle.parameters; input_filename The name of the file to be signed. output_filename The name of the file to deposit the results. certificate The signing certificate. See Key/Certificate parameters for a list of valid values. private_key The key associated with certificate. See Key/Certificate parameters for a list of valid values. headers An array of headers to be included in S/MIME output. flags Flags to be passed to cms_sign. encoding The encoding of the output file. One of OPENSSL_CMS_SMIME, OPENSLL_CMS_DER or OPENSSL_CMS_PEM. untrusted_certificates_filename Intermediate certificates to be included in the signature. &reftitle.returnvalues; &return.success; &reftitle.examples; <function>openssl_cms_sign</function> example ]]>