 signing is being used and <b>CMS_STREAM</b> not set then the data must be read twice: once to compute the signature in CMS_sign() and once to output the S/MIME message.</p>

<p>If streaming is performed the content is output in BER format using indefinite length constructed encoding except in the case of signed data with detached content where the content is absent and DER format is used.</p>

<h1 id="BUGS">BUGS</h1>

<p>SMIME_write_CMS() always base64 encodes CMS structures, there should be an option to d