X509V3_add1_i2d

Encode extension structure value and add/replace it on stack *x.

Synopsis

Declared in <openssl/x509v3.h>

int
X509V3_add1_i2d(
    stack_st_X509_EXTENSION** x,
    int nid,
    void* value,
    int crit,
    unsigned long flags);

Return Value

1 on success, 0 on error, or -1 when a replace was requested but no match existed.

Parameters

NameDescription
xAddress of the extension stack (allocated if NULL).
nidExtension NID to create.
valueExtension-specific C structure understood by the X509V3 method for nid.
critNonzero to mark the extension critical.
flagsX509V3_ADD_* behaviour flags (append, replace, keep existing, …).