[#EVP_PKEY_derive_set_peer]
= EVP&lowbar;PKEY&lowbar;derive&lowbar;set&lowbar;peer
:mrdocs:

Set the peer public key used by EVP&lowbar;PKEY&lowbar;derive() on a derivation context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;derive&lowbar;set&lowbar;peer(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* peer);
----

== Return Value

1 on success, or a negative value &sol; 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Initialized derive context from EVP&lowbar;PKEY&lowbar;derive&lowbar;init()&period;
| *peer*
| Peer public key&semi; ownership is not transferred&period;
|===


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