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