[#PEM_read_bio_ex]
= PEM&lowbar;read&lowbar;bio&lowbar;ex
:mrdocs:

Read one PEM object from a BIO with controllable decoding behaviour&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PEM&lowbar;read&lowbar;bio&lowbar;ex(
    xref:BIO.adoc[BIO]* bp,
    char** name,
    char** header,
    unsigned char** data,
    long* len,
    unsigned int flags);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bp*
| BIO to read from&period;
| *name*
| Receives the allocated type name from the BEGIN line&semi; caller frees it&period;
| *header*
| Receives allocated encapsulation headers, or an empty string&semi; caller frees it&period;
| *data*
| Receives allocated base64&hyphen;decoded payload&semi; caller frees it&period;
| *len*
| Receives the length of `data` in bytes&period;
| *flags*
| Bitwise OR of PEM&lowbar;FLAG&lowbar;SECURE, PEM&lowbar;FLAG&lowbar;EAY&lowbar;COMPATIBLE, and&sol;or PEM&lowbar;FLAG&lowbar;ONLY&lowbar;B64&period;
|===


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