ASN1_item_d2i_ex

Decode a DER-encoded ASN.1 value using an item descriptor and library context.

Synopsis

Declared in <openssl/asn1.h>

ASN1_VALUE*
ASN1_item_d2i_ex(
    ASN1_VALUE** val,
    unsigned char const** in,
    long len,
    ASN1_ITEM const* it,
    OSSL_LIB_CTX* libctx,
    char const* propq);

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.
libctxLibrary context for algorithm fetches during decode, or NULL for the default.
propqProperty query for algorithm fetches, or NULL.