an error is returned.</p>

<p>CMS_EnvelopedData_decrypt() decrypts, similarly to CMS_decrypt(3), a CMS EnvelopedData object <i>env</i> using the symmetric key <i>secret</i> if it is not NULL, otherwise the private key of the recipient <i>pkey</i>. If <i>pkey</i> is given, it is recommended to provide also the associated certificate in <i>cert</i> - see <a href="../man3/CMS_decrypt.html">CMS_decrypt(3)</a> and the NOTES on <i>cert</i> there. The optional parameters <i>flags</i> and <i>dcont</i> are used as d