X509V3_get_d2i

Decode the first (or next) extension of type nid from a stack into its native structure.

Synopsis

Declared in <openssl/x509v3.h>

void*
X509V3_get_d2i(
    stack_st_X509_EXTENSION const* x,
    int nid,
    int* crit,
    int* idx);

Return Value

Newly allocated extension-specific object (caller frees), or NULL if not found / on error.

Parameters

NameDescription
xExtension stack to search.
nidNID of the extension type to decode.
critOptional out-parameter receiving 1 if critical, -1 if not found, or may be NULL.
idxOptional in/out index to resume search after a previous match, or NULL for the first.