ASN1_d2i_bio

Decode an ASN.1 value from a BIO using allocator and d2i callbacks.

Synopsis

Declared in <openssl/asn1.h>

void*
ASN1_d2i_bio(
    void*(* xnew)(),
    d2i_of_void* d2i,
    BIO* in,
    void** x);

Return Value

Decoded object pointer, or NULL on error.

Parameters

NameDescription
xnewAllocator returning a new empty object (for example TYPE_new).
d2iDecoder of type d2i_of_void that parses DER into the object.
inBIO positioned at DER (or BER) encoding.
xOptional destination pointer updated to the decoded object, or NULL.