[#EVP_PKEY_CTX_set_dh_nid]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;nid
:mrdocs:

Select named Diffie&hyphen;Hellman parameters (RFC 7919 &sol; RFC 3526) by NID&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;nid(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int nid);
----

== Description

Mutually exclusive with EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;rfc5114() &sol; set&lowbar;dhx&lowbar;rfc5114()&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 used for DH parameter or key generation&period;
| *nid*
| Named group such as NID&lowbar;ffdhe2048 or NID&lowbar;modp&lowbar;2048, or NID&lowbar;undef to clear&period;
|===


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