CRYPTO_alloc_ex_data

Allocate ex_data at index idx by invoking the registered new callback if unset.

Synopsis

Declared in <openssl/crypto.h>

int
CRYPTO_alloc_ex_data(
    int class_index,
    void* obj,
    CRYPTO_EX_DATA* ad,
    int idx);

Return Value

1 on success (including when a value is already present), or 0 on failure.

Parameters

NameDescription
class_indexCRYPTO_EX_INDEX_* identifying the object class.
objObject that owns ad (passed to the new callback).
adEx-data table to allocate into.
idxIndex from CRYPTO_get_ex_new_index() (or a class helper).