Read a named PEM object from a BIO, decrypting if needed, and return its DER bytes.
Synopsis
Declared in <openssl/pem.h>
int
PEM_bytes_read_bio(
unsigned char** pdata,
long* plen,
char** pnm,
char const* name,
BIO* bp,
pem_password_cb* cb,
void* u);
Return Value
1 on success, or 0 on failure.
Parameters
Name |
Description |
pdata |
Receives newly allocated DER payload (caller frees with OPENSSL_free). |
plen |
Receives the length of *`pdata` in bytes. |
pnm |
Optional; receives the actual PEM type name from the BEGIN line (caller frees). |
name |
Expected PEM type label (for example "CERTIFICATE"); non‐matching types are skipped. |
bp |
BIO to read from. |
cb |
Password callback for encrypted PEM, or NULL. |
u |
Application data passed to |
Created with MrDocs