PEM_ASN1_read_bio

Read a named PEM object from a BIO and decode it with d2i.

Synopsis

Declared in <openssl/pem.h>

void*
PEM_ASN1_read_bio(
    d2i_of_void* d2i,
    char const* name,
    BIO* bp,
    void** x,
    pem_password_cb* cb,
    void* u);

Return Value

Decoded object on success, or NULL on failure.

Parameters

NameDescription
d2iASN.1 decode callback for the expected type.
namePEM type label expected on the BEGIN line (e.g. "CERTIFICATE").
bpBIO to read from.
xOptional address of an object pointer to reuse, or NULL.
cbPassword callback for encrypted PEM, or NULL.
uApplication data passed to cb.