DH_new_by_nid

Allocate a DH object preloaded with named safe-prime parameters.

Synopsis

Declared in <openssl/dh.h>

[[deprecated]]
DH*
DH_new_by_nid(int nid);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Description

Deprecated since OpenSSL 3.0; prefer EVP_PKEY_fromdata() with a named group.

Return Value

New DH with the named parameters set, or NULL if nid is unsupported or on allocation failure.

Parameters

NameDescription
nidNamed group NID such as NID_ffdhe2048 or NID_modp_2048.