[#EVP_PKEY_CTX_new_from_pkey]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;new&lowbar;from&lowbar;pkey
:mrdocs:

Allocate a key context for operations on an existing EVP&lowbar;PKEY&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]*
EVP&lowbar;PKEY&lowbar;CTX&lowbar;new&lowbar;from&lowbar;pkey(
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    char const* propquery);
----

== Return Value

New EVP&lowbar;PKEY&lowbar;CTX, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *libctx*
| Library context used to fetch algorithms, or NULL for the default&period;
| *pkey*
| Key that determines the algorithm and provides key material&period;
| *propquery*
| Property query for algorithm fetches, or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
