[#EVP_PKEY_CTX_set_dh_rfc5114]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;rfc5114
:mrdocs:

Select RFC 5114 DH parameters (sections 2&period;1–2&period;3) on a DHX key context&period;

== Synopsis

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

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

== Description

Mutually exclusive with EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;nid()&period;

== Return Value

1 on success, or a non&hyphen;positive value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| EVP&lowbar;PKEY&lowbar;CTX with key type EVP&lowbar;PKEY&lowbar;DHX used for parameter generation&period;
| *gen*
| 1, 2, or 3 for RFC 5114 §2&period;1&sol;§2&period;2&sol;§2&period;3, or 0 to clear&period;
|===


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