Read one PEM object from a BIO with controllable decoding behaviour.
Declared in <openssl/pem.h>
int
PEM_read_bio_ex(
BIO* bp,
char** name,
char** header,
unsigned char** data,
long* len,
unsigned int flags);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| bp | BIO to read from. |
| name | Receives the allocated type name from the BEGIN line; caller frees it. |
| header | Receives allocated encapsulation headers, or an empty string; caller frees it. |
| data | Receives allocated base64-decoded payload; caller frees it. |
| len | Receives the length of data in bytes. |
| flags | Bitwise OR of PEM_FLAG_SECURE, PEM_FLAG_EAY_COMPATIBLE, and/or PEM_FLAG_ONLY_B64. |