Add support for DH 'modp' group parameters (RFC 3526)
[openssl.git] / doc / man3 / DH_new_by_nid.pod
1 =pod
2
3 =head1 NAME
4
5 DH_new_by_nid, DH_get_nid - get or find DH named parameters
6
7 =head1 SYNOPSIS
8
9  #include <openssl/dh.h>
10  DH *DH_new_by_nid(int nid);
11  int *DH_get_nid(DH *dh);
12
13 =head1 DESCRIPTION
14
15 DH_new_by_nid() creates and returns a DH structure containing named parameters
16 B<nid>. Currently B<nid> must be B<NID_ffdhe2048>, B<NID_ffdhe3072>,
17 B<NID_ffdhe4096>, B<NID_ffdhe6144>, B<NID_ffdhe8192>,
18 B<NID_modp_1536>, B<NID_modp_2048>, B<NID_modp_3072>,
19 B<NID_modp_4096>, B<NID_modp_6144> or B<NID_modp_8192>.
20
21
22 DH_get_nid() determines if the parameters contained in B<dh> match
23 any named set. It returns the NID corresponding to the matching parameters or
24 B<NID_undef> if there is no match.
25
26 =head1 RETURN VALUES
27
28 DH_new_by_nid() returns a set of DH parameters or B<NULL> if an error occurred.
29
30 DH_get_nid() returns the NID of the matching set of parameters or
31 B<NID_undef> if there is no match.
32
33 =head1 COPYRIGHT
34
35 Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
36
37 Licensed under the Apache License 2.0 (the "License").  You may not use
38 this file except in compliance with the License.  You can obtain a copy
39 in the file LICENSE in the source distribution or at
40 L<https://www.openssl.org/source/license.html>.
41
42 =cut