xref: /netbsd-src/crypto/external/bsd/openssl/dist/doc/man3/DH_new.pod (revision b0d1725196a7921d003d2c66a14f186abda4176b)
113d40330Schristos=pod
213d40330Schristos
313d40330Schristos=head1 NAME
413d40330Schristos
513d40330SchristosDH_new, DH_free - allocate and free DH objects
613d40330Schristos
713d40330Schristos=head1 SYNOPSIS
813d40330Schristos
913d40330Schristos #include <openssl/dh.h>
1013d40330Schristos
11*b0d17251SchristosThe following functions have been deprecated since OpenSSL 3.0, and can be
12*b0d17251Schristoshidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13*b0d17251Schristossee L<openssl_user_macros(7)>:
14*b0d17251Schristos
1513d40330Schristos DH* DH_new(void);
1613d40330Schristos
1713d40330Schristos void DH_free(DH *dh);
1813d40330Schristos
1913d40330Schristos=head1 DESCRIPTION
2013d40330Schristos
2113d40330SchristosDH_new() allocates and initializes a B<DH> structure.
2213d40330Schristos
2313d40330SchristosDH_free() frees the B<DH> structure and its components. The values are
2413d40330Schristoserased before the memory is returned to the system.
2513d40330SchristosIf B<dh> is NULL nothing is done.
2613d40330Schristos
2713d40330Schristos=head1 RETURN VALUES
2813d40330Schristos
2913d40330SchristosIf the allocation fails, DH_new() returns B<NULL> and sets an error
3013d40330Schristoscode that can be obtained by L<ERR_get_error(3)>. Otherwise it returns
3113d40330Schristosa pointer to the newly allocated structure.
3213d40330Schristos
3313d40330SchristosDH_free() returns no value.
3413d40330Schristos
3513d40330Schristos=head1 SEE ALSO
3613d40330Schristos
3713d40330SchristosL<DH_new(3)>, L<ERR_get_error(3)>,
3813d40330SchristosL<DH_generate_parameters(3)>,
39*b0d17251SchristosL<DH_generate_key(3)>,
40*b0d17251SchristosL<EVP_PKEY-DH(7)>
41*b0d17251Schristos
42*b0d17251Schristos=head1 HISTORY
43*b0d17251Schristos
44*b0d17251SchristosAll of these functions were deprecated in OpenSSL 3.0.
45*b0d17251Schristos
46*b0d17251SchristosFor replacement see EVP_PKEY-DH(7).
4713d40330Schristos
4813d40330Schristos=head1 COPYRIGHT
4913d40330Schristos
50*b0d17251SchristosCopyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
5113d40330Schristos
52*b0d17251SchristosLicensed under the Apache License 2.0 (the "License").  You may not use
5313d40330Schristosthis file except in compliance with the License.  You can obtain a copy
5413d40330Schristosin the file LICENSE in the source distribution or at
5513d40330SchristosL<https://www.openssl.org/source/license.html>.
5613d40330Schristos
5713d40330Schristos=cut
58