Create an EVP_PKEY from raw private‐key octets using a named algorithm and library context.

Synopsis

Declared in <openssl/evp.h>

EVP_PKEY*
EVP_PKEY_new_raw_private_key_ex(
    OSSL_LIB_CTX* libctx,
    char const* keytype,
    char const* propq,
    unsigned char const* priv,
    size_t len);

Return Value

New EVP_PKEY, or NULL on failure; free with EVP_PKEY_free.

Parameters

Name

Description

libctx

Library context used to fetch the key type, or NULL for the default.

keytype

Algorithm name such as "ED25519" or "X25519".

propq

Property query string, or NULL.

priv

Raw private‐key bytes in the algorithm‐native format.

len

Length of priv in bytes.

Created with MrDocs