[int$flags = PKCS7_DETACHED],
[string|null$untrusted_certificates_filename = null]
openssl_pkcs7_sign takes the contents of the file named input_filename and signs them using the certificate and its matching private key specified by certificate and private_key parameters.
The input file you are intending to digitally sign.
The file which the digital signature will be written to.
The X.509 certificate used to digitally sign input_filename. See Key/Certificate parameters for a list of valid values.
private_key is the private key corresponding to certificate. See Public/Private Key parameters for a list of valid values.
headers is an array of headers that will be prepended to the data after it has been signed (see openssl_pkcs7_encrypt for more information about the format of this parameter).
flags can be used to alter the output - see PKCS7 constants.
untrusted_certificates_filename specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.
Returns true on success or false on failure.
|8.0.0||certificate accepts an OpenSSLCertificate instance now; previously, a resource of type OpenSSL X.509 CSR was accepted.|
|8.0.0||private_key accepts an OpenSSLAsymmetricKey or OpenSSLCertificate instance now; previously, a resource of type OpenSSL key or OpenSSL X.509 CSR was accepted.|