ASN1_item_i2d_mem_bio

Encode an ASN.1 value described by it into a newly allocated memory BIO.

Synopsis

Declared in <openssl/asn1.h>

BIO*
ASN1_item_i2d_mem_bio(
    ASN1_ITEM const* it,
    ASN1_VALUE const* val);

Return Value

Memory BIO holding the DER encoding, or NULL on error; free with BIO_free().

Parameters

NameDescription
itASN.1 item descriptor for the type of val.
valValue to encode (may be NULL for some optional types).