1DH_NEW_BY_NID(3ossl) OpenSSL DH_NEW_BY_NID(3ossl)
2
3
4
6 DH_new_by_nid, DH_get_nid - create or get DH named parameters
7
9 #include <openssl/dh.h>
10
11 The following functions have been deprecated since OpenSSL 3.0, and can
12 be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
13 version value, see openssl_user_macros(7):
14
15 DH *DH_new_by_nid(int nid);
16
17 int DH_get_nid(const DH *dh);
18
20 DH_new_by_nid() creates and returns a DH structure containing named
21 parameters nid. Currently nid must be NID_ffdhe2048, NID_ffdhe3072,
22 NID_ffdhe4096, NID_ffdhe6144, NID_ffdhe8192, NID_modp_1536,
23 NID_modp_2048, NID_modp_3072, NID_modp_4096, NID_modp_6144 or
24 NID_modp_8192.
25
26 DH_get_nid() determines if the parameters contained in dh match any
27 named safe prime group. It returns the NID corresponding to the
28 matching parameters or NID_undef if there is no match. This function
29 is deprecated.
30
32 DH_new_by_nid() returns a set of DH parameters or NULL if an error
33 occurred.
34
35 DH_get_nid() returns the NID of the matching set of parameters for p
36 and g and optionally q, otherwise it returns NID_undef if there is no
37 match.
38
40 All of these functions were deprecated in OpenSSL 3.0.
41
43 Copyright 2017-2022 The OpenSSL Project Authors. All Rights Reserved.
44
45 Licensed under the Apache License 2.0 (the "License"). You may not use
46 this file except in compliance with the License. You can obtain a copy
47 in the file LICENSE in the source distribution or at
48 <https://www.openssl.org/source/license.html>.
49
50
51
523.1.1 2023-08-31 DH_NEW_BY_NID(3ossl)