[#PEM_write_bio_ASN1_stream]
= PEM&lowbar;write&lowbar;bio&lowbar;ASN1&lowbar;stream
:mrdocs:

Stream&hyphen;encode an ASN&period;1 value as a PEM object, optionally pulling content from `in&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PEM&lowbar;write&lowbar;bio&lowbar;ASN1&lowbar;stream(
    xref:BIO.adoc[BIO]* out,
    xref:ASN1_VALUE.adoc[ASN1&lowbar;VALUE]* val,
    xref:BIO.adoc[BIO]* in,
    int flags,
    char const* hdr,
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| BIO that receives the PEM output&period;
| *val*
| ASN&period;1 value to encode (not const because streaming may update state)&period;
| *in*
| Optional content BIO for indefinite&hyphen;length &sol; streaming payloads, or NULL&period;
| *flags*
| SMIME&sol;CMS streaming flags (for example SMIME&lowbar;STREAM)&period;
| *hdr*
| PEM header label such as &quot;CMS&quot; or &quot;PKCS7&quot; (without BEGIN&sol;END)&period;
| *it*
| ASN&period;1 item descriptor for `val&period;`
|===


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