[#DH_new_by_nid]
= DH&lowbar;new&lowbar;by&lowbar;nid
:mrdocs:

Allocate a DH object preloaded with named safe&hyphen;prime parameters&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
xref:DH.adoc[DH]*
DH&lowbar;new&lowbar;by&lowbar;nid(int nid);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Description

Deprecated since OpenSSL 3&period;0&semi; prefer EVP&lowbar;PKEY&lowbar;fromdata() with a named group&period;

== Return Value

New DH with the named parameters set, or NULL if `nid` is unsupported or on allocation failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nid*
| Named group NID such as NID&lowbar;ffdhe2048 or NID&lowbar;modp&lowbar;2048&period;
|===


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