OSSL_PARAM_allocate_from_text

Allocate and fill an OSSL_PARAM from a textual key/value using a param definition list.

Synopsis

Declared in <openssl/params.h>

int
OSSL_PARAM_allocate_from_text(
    OSSL_PARAM* to,
    OSSL_PARAM const* paramdefs,
    char const* key,
    char const* value,
    size_t value_n,
    int* found);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
toDestination parameter; on success owns freshly allocated data that the caller must free.
paramdefsArray of parameter definitions describing allowed keys and types.
keyParameter name to look up in paramdefs.
valueTextual representation of the value (encoding depends on the matched type).
value_nLength of value in bytes (not necessarily NUL-terminated).
foundOptional; set to 1 if key was found in paramdefs, else 0.