EVP_PKEY_CTX_new_from_pkey

Allocate a key context for operations on an existing EVP_PKEY.

Synopsis

Declared in <openssl/evp.h>

EVP_PKEY_CTX*
EVP_PKEY_CTX_new_from_pkey(
    OSSL_LIB_CTX* libctx,
    EVP_PKEY* pkey,
    char const* propquery);

Return Value

New EVP_PKEY_CTX, or NULL on failure.

Parameters

NameDescription
libctxLibrary context used to fetch algorithms, or NULL for the default.
pkeyKey that determines the algorithm and provides key material.
propqueryProperty query for algorithm fetches, or NULL.