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