[#CMS_EnvelopedData_decrypt] = CMS_EnvelopedData_decrypt :mrdocs: Decrypt a CMS EnvelopedData structure and return a BIO of the plaintext. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BIO.adoc[BIO]* CMS_EnvelopedData_decrypt( xref:CMS_EnvelopedData.adoc[CMS_EnvelopedData]* env, xref:BIO.adoc[BIO]* detached_data, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:X509.adoc[X509]* cert, xref:ASN1_OCTET_STRING.adoc[ASN1_OCTET_STRING]* secret, unsigned int flags, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value BIO containing the decrypted content, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *env* | EnvelopedData to decrypt. | *detached_data* | Detached encrypted‐content BIO when applicable; normally NULL. | *pkey* | Recipient private key when `secret` is NULL. | *cert* | Recipient certificate used to select the RecipientInfo; recommended when `pkey` is set. | *secret* | Pre‐shared content‐encryption key, or NULL to unwrap with `pkey.` | *flags* | Optional CMS decrypt flags (for example CMS_TEXT). | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Property query for provider selection, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#