Read one PEM object from a BIO, returning name, header, and decoded data.
Declared in <openssl/pem.h>
int
PEM_read_bio(
BIO* bp,
char** name,
char** header,
unsigned char** data,
long* len);
1 on success, or 0 on failure / end of input.
| Name | Description |
|---|---|
| bp | BIO to read from. |
| name | Receives a newly allocated PEM type name (caller frees with OPENSSL_free). |
| header | Receives a newly allocated PEM header block, or an empty string. |
| data | Receives newly allocated decoded payload bytes. |
| len | Receives the length of *data in bytes. |