1e71b7053SJung-uk Kim=pod 2e71b7053SJung-uk Kim 3e71b7053SJung-uk Kim=head1 NAME 4e71b7053SJung-uk Kim 5*b077aed3SPierre ProncheryDH_new_by_nid, DH_get_nid - create or get DH named parameters 6e71b7053SJung-uk Kim 7e71b7053SJung-uk Kim=head1 SYNOPSIS 8e71b7053SJung-uk Kim 9e71b7053SJung-uk Kim #include <openssl/dh.h> 10*b077aed3SPierre Pronchery 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_by_nid(int nid); 16*b077aed3SPierre Pronchery 17*b077aed3SPierre Pronchery int DH_get_nid(const DH *dh); 18e71b7053SJung-uk Kim 19e71b7053SJung-uk Kim=head1 DESCRIPTION 20e71b7053SJung-uk Kim 21e71b7053SJung-uk KimDH_new_by_nid() creates and returns a DH structure containing named parameters 22e71b7053SJung-uk KimB<nid>. Currently B<nid> must be B<NID_ffdhe2048>, B<NID_ffdhe3072>, 23*b077aed3SPierre ProncheryB<NID_ffdhe4096>, B<NID_ffdhe6144>, B<NID_ffdhe8192>, 24*b077aed3SPierre ProncheryB<NID_modp_1536>, B<NID_modp_2048>, B<NID_modp_3072>, 25*b077aed3SPierre ProncheryB<NID_modp_4096>, B<NID_modp_6144> or B<NID_modp_8192>. 26e71b7053SJung-uk Kim 27e71b7053SJung-uk KimDH_get_nid() determines if the parameters contained in B<dh> match 28*b077aed3SPierre Proncheryany named safe prime group. It returns the NID corresponding to the matching 29*b077aed3SPierre Proncheryparameters or B<NID_undef> if there is no match. 30*b077aed3SPierre ProncheryThis function is deprecated. 31e71b7053SJung-uk Kim 32e71b7053SJung-uk Kim=head1 RETURN VALUES 33e71b7053SJung-uk Kim 34e71b7053SJung-uk KimDH_new_by_nid() returns a set of DH parameters or B<NULL> if an error occurred. 35e71b7053SJung-uk Kim 36*b077aed3SPierre ProncheryDH_get_nid() returns the NID of the matching set of parameters for p and g 37*b077aed3SPierre Proncheryand optionally q, otherwise it returns B<NID_undef> if there is no match. 38*b077aed3SPierre Pronchery 39*b077aed3SPierre Pronchery=head1 HISTORY 40*b077aed3SPierre Pronchery 41*b077aed3SPierre ProncheryAll of these functions were deprecated in OpenSSL 3.0. 42e71b7053SJung-uk Kim 43e71b7053SJung-uk Kim=head1 COPYRIGHT 44e71b7053SJung-uk Kim 45*b077aed3SPierre ProncheryCopyright 2017-2022 The OpenSSL Project Authors. All Rights Reserved. 46e71b7053SJung-uk Kim 47*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 48e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 49e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 50e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 51e71b7053SJung-uk Kim 52e71b7053SJung-uk Kim=cut 53