From ad0175ba440b2cb9f22eefc2ca756b885ed79d35 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 4 Jan 2021 13:04:55 +0100 Subject: [PATCH] Actually document openssl_cms_*() functions --- .../openssl/functions/openssl-cms-decrypt.xml | 100 +++++++++++++ .../openssl/functions/openssl-cms-encrypt.xml | 119 +++++++++++++++ .../openssl/functions/openssl-cms-read.xml | 76 ++++++++++ .../openssl/functions/openssl-cms-sign.xml | 127 ++++++++++++++++ .../openssl/functions/openssl-cms-verify.xml | 136 ++++++++++++++++++ 5 files changed, 558 insertions(+) create mode 100644 reference/openssl/functions/openssl-cms-decrypt.xml create mode 100644 reference/openssl/functions/openssl-cms-encrypt.xml create mode 100644 reference/openssl/functions/openssl-cms-read.xml create mode 100644 reference/openssl/functions/openssl-cms-sign.xml create mode 100644 reference/openssl/functions/openssl-cms-verify.xml diff --git a/reference/openssl/functions/openssl-cms-decrypt.xml b/reference/openssl/functions/openssl-cms-decrypt.xml new file mode 100644 index 0000000000..1552a8a6ec --- /dev/null +++ b/reference/openssl/functions/openssl-cms-decrypt.xml @@ -0,0 +1,100 @@ + + + + + + openssl_cms_decrypt + Decrypt a CMS message + + + + &reftitle.description; + + boolopenssl_cms_decrypt + stringinput_filename + stringoutput_filename + OpenSSLCertificatestringcertificate + OpenSSLAsymmetricKeyOpenSSLCertificatearraystringnullprivate_key&null; + intencodingOPENSSL_ENCODING_SMIME + + + Decrypts a CMS message. + + + + + &reftitle.parameters; + + + input_filename + + + The name of a file containing encrypted content. + + + + + output_filename + + + The name of the file to deposit the decrypted content. + + + + + certificate + + + The name of the file containing a certificate of the recipient. + + + + + private_key + + + The name of the file containing a PKCS#8 key. + + + + + encoding + + + The encoding of the input file. One of OPENSSL_CMS_SMIME, + OPENSLL_CMS_DER or OPENSSL_CMS_PEM. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + diff --git a/reference/openssl/functions/openssl-cms-encrypt.xml b/reference/openssl/functions/openssl-cms-encrypt.xml new file mode 100644 index 0000000000..4bc4b28e23 --- /dev/null +++ b/reference/openssl/functions/openssl-cms-encrypt.xml @@ -0,0 +1,119 @@ + + + + + + openssl_cms_encrypt + Encrypt a CMS message + + + + &reftitle.description; + + boolopenssl_cms_encrypt + stringinput_filename + stringoutput_filename + OpenSSLCertificatearraystringcertificate + arraynullheaders + intflags0 + intencodingOPENSSL_ENCODING_SMIME + intcipher_algoOPENSSL_CIPHER_RC2_40 + + + This function encrypts content to one or more recipients, + based on the certificates that are passed to it. + + + + + &reftitle.parameters; + + + input_filename + + + The file to be encrypted. + + + + + output_filename + + + The output file. + + + + + certificate + + + Recipients to encrypt to. + + + + + headers + + + Headers to include when S/MIME is used. + + + + + flags + + + Flags to be passed to CMS_sign. + + + + + encoding + + + An encoding to output. One of OPENSSL_CMS_SMIME, + OPENSLL_CMS_DER or OPENSSL_CMS_PEM. + + + + + cipher_algo + + + A cypher to use. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + diff --git a/reference/openssl/functions/openssl-cms-read.xml b/reference/openssl/functions/openssl-cms-read.xml new file mode 100644 index 0000000000..89fd459e24 --- /dev/null +++ b/reference/openssl/functions/openssl-cms-read.xml @@ -0,0 +1,76 @@ + + + + + + openssl_cms_read + Export the CMS file to an array of PEM certificates + + + + &reftitle.description; + + boolopenssl_cms_read + stringinput_filename + arraycertificates + + + Performs the exact analog to openssl_pkcs7_read. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + input_filename + + + + + + + + certificates + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/openssl/functions/openssl-cms-sign.xml b/reference/openssl/functions/openssl-cms-sign.xml new file mode 100644 index 0000000000..1879b78441 --- /dev/null +++ b/reference/openssl/functions/openssl-cms-sign.xml @@ -0,0 +1,127 @@ + + + + + + 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 name of the file containing the signing certificate. + + + + + private_key + + + The name of file containing the key associated with certificate. + + + + + 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; + + + + + + diff --git a/reference/openssl/functions/openssl-cms-verify.xml b/reference/openssl/functions/openssl-cms-verify.xml new file mode 100644 index 0000000000..75271cd7e5 --- /dev/null +++ b/reference/openssl/functions/openssl-cms-verify.xml @@ -0,0 +1,136 @@ + + + + + + openssl_cms_verify + Verify a CMS signature + + + + &reftitle.description; + + boolopenssl_cms_verify + stringinput_filename + intflags0 + stringnullcertificates&null; + arrayca_info[] + stringnulluntrusted_certificates_filename&null; + stringnullcontent&null; + stringnullpk7&null; + stringnullsigfile&null; + intencodingOPENSSL_ENCODING_SMIME + + + This function verifies a CMS signature, either attached or detached, with the specified encoding. + + + + + &reftitle.parameters; + + + input_filename + + + The input file. + + + + + flags + + + Flags to pass to cms_verify. + + + + + certificates + + + A file with the signer certificate and optionally intermediate certificates. + + + + + ca_info + + + An array containing self-signed certificate authority certificates. + + + + + untrusted_certificates_filename + + + A file containing additional intermediate certificates. + + + + + content + + + A file pointing to the content when signatures are detached. + + + + + pk7 + + + + + + + + sigfile + + + A file to save the signature to. + + + + + encoding + + + The encoding of the input file. One of OPENSSL_CMS_SMIME, + OPENSLL_CMS_DER or OPENSSL_CMS_PEM. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + +