[#EVP_PKEY_CTX_get_ecdh_cofactor_mode]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;get&lowbar;ecdh&lowbar;cofactor&lowbar;mode
:mrdocs:

Get the ECDH cofactor mode from a key context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;get&lowbar;ecdh&lowbar;cofactor&lowbar;mode(xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx);
----

== Return Value

Cofactor mode (0 &equals; disable, 1 &equals; enable, &hyphen;1 &equals; use key default), or a negative error code&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key context configured for ECDH&period;
|===


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