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

Read one PEM object from a BIO, returning name, header, and decoded data&period;

== Synopsis

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

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

== Return Value

1 on success, or 0 on failure &sol; end of input&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bp*
| BIO to read from&period;
| *name*
| Receives a newly allocated PEM type name (caller frees with OPENSSL&lowbar;free)&period;
| *header*
| Receives a newly allocated PEM header block, or an empty string&period;
| *data*
| Receives newly allocated decoded payload bytes&period;
| *len*
| Receives the length of &ast;`data` in bytes&period;
|===


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