ASN1_item_i2d

Encode an ASN.1 value described by it to DER.

Synopsis

Declared in <openssl/asn1.h>

int
ASN1_item_i2d(
    ASN1_VALUE const* val,
    unsigned char** out,
    ASN1_ITEM const* it);

Return Value

Number of bytes encoded, or a negative value on error.

Parameters

NameDescription
valValue to encode (typed according to it).
outDestination pointer updated like a standard i2d encoder, or NULL to measure length.
itASN.1 item descriptor for the type of val.