[#PEM_write_bio_CMS_stream]
= PEM&lowbar;write&lowbar;bio&lowbar;CMS&lowbar;stream
:mrdocs:

Write a CMS ContentInfo as a PEM CMS message, optionally streaming content from `in&period;`

== Synopsis

Declared in `&lt;openssl&sol;cms&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PEM&lowbar;write&lowbar;bio&lowbar;CMS&lowbar;stream(
    xref:BIO.adoc[BIO]* out,
    xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]* cms,
    xref:BIO.adoc[BIO]* in,
    int flags);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| BIO that receives the PEM&hyphen;encoded CMS&period;
| *cms*
| CMS structure to encode&period;
| *in*
| BIO supplying detached or streaming content when required by `flags,` or NULL&period;
| *flags*
| CMS&lowbar;&ast; flags controlling streaming and encoding behaviour&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
