[#CMS_decrypt] = CMS_decrypt :mrdocs: Decrypt a CMS EnvelopedData or AuthEnvelopedData and write the content. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int CMS_decrypt( xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* cms, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:X509.adoc[X509]* cert, xref:BIO.adoc[BIO]* dcont, xref:BIO.adoc[BIO]* out, unsigned int flags); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *cms* | Enveloped ContentInfo to decrypt. | *pkey* | Recipient private key, or NULL if a key was already set via CMS_decrypt_set1_*. | *cert* | Recipient certificate used to locate the matching RecipientInfo; may be NULL. | *dcont* | Detached encrypted‐content BIO when applicable; normally NULL. | *out* | BIO that receives the decrypted content (may be NULL when only setting up keys). | *flags* | Optional CMS decrypt flags (for example CMS_TEXT or CMS_DEBUG_DECRYPT). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#