xref: /openssl/doc/man3/DH_new.pod (revision 65b41ab3)
1=pod
2
3=head1 NAME
4
5DH_new, DH_free - allocate and free DH objects
6
7=head1 SYNOPSIS
8
9 #include <openssl/dh.h>
10
11The following functions have been deprecated since OpenSSL 3.0, and can be
12hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13see L<openssl_user_macros(7)>:
14
15 DH* DH_new(void);
16
17 void DH_free(DH *dh);
18
19=head1 DESCRIPTION
20
21DH_new() allocates and initializes a B<DH> structure.
22
23DH_free() frees the B<DH> structure and its components. The values are
24erased before the memory is returned to the system.
25If B<dh> is NULL nothing is done.
26
27=head1 RETURN VALUES
28
29If the allocation fails, DH_new() returns B<NULL> and sets an error
30code that can be obtained by L<ERR_get_error(3)>. Otherwise it returns
31a pointer to the newly allocated structure.
32
33DH_free() returns no value.
34
35=head1 SEE ALSO
36
37L<DH_new(3)>, L<ERR_get_error(3)>,
38L<DH_generate_parameters(3)>,
39L<DH_generate_key(3)>,
40L<EVP_PKEY-DH(7)>
41
42=head1 HISTORY
43
44All of these functions were deprecated in OpenSSL 3.0.
45
46For replacement see EVP_PKEY-DH(7).
47
48=head1 COPYRIGHT
49
50Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
51
52Licensed under the Apache License 2.0 (the "License").  You may not use
53this file except in compliance with the License.  You can obtain a copy
54in the file LICENSE in the source distribution or at
55L<https://www.openssl.org/source/license.html>.
56
57=cut
58