ASN1_item_d2i

Decode a DER-encoded ASN.1 value using an item descriptor (default library context).

Synopsis

Declared in <openssl/asn1.h>

ASN1_VALUE*
ASN1_item_d2i(
    ASN1_VALUE** val,
    unsigned char const** in,
    long len,
    ASN1_ITEM const* it);

Description

Equivalent to ASN1_item_d2i_ex() with a NULL library context and property query.

Return Value

Decoded ASN1_VALUE, or NULL on error.

Parameters

NameDescription
valOptional destination pointer updated to the result, or NULL.
inAddress of a pointer to the DER input; advanced past the decoded value.
lenNumber of bytes available at *in.
itASN.1 item descriptor for the type to decode.