CRYPTO_strdup

Duplicate a NUL-terminated string using the OpenSSL allocator.

Synopsis

Declared in <openssl/crypto.h>

char*
CRYPTO_strdup(
    char const* str,
    char const* file,
    int line);

Return Value

Newly allocated copy, or NULL on failure.

Parameters

NameDescription
strString to copy.
fileSource file name recorded with the allocation (usually FILE).
lineSource line recorded with the allocation (usually LINE).