1e1051a39Sopenharmony_ci=pod 2e1051a39Sopenharmony_ci 3e1051a39Sopenharmony_ci=head1 NAME 4e1051a39Sopenharmony_ci 5e1051a39Sopenharmony_ciDSA_set_default_method, DSA_get_default_method, 6e1051a39Sopenharmony_ciDSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method 7e1051a39Sopenharmony_ci 8e1051a39Sopenharmony_ci=head1 SYNOPSIS 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci #include <openssl/dsa.h> 11e1051a39Sopenharmony_ci 12e1051a39Sopenharmony_ciThe following functions have been deprecated since OpenSSL 3.0, and can be 13e1051a39Sopenharmony_cihidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value, 14e1051a39Sopenharmony_cisee L<openssl_user_macros(7)>: 15e1051a39Sopenharmony_ci 16e1051a39Sopenharmony_ci void DSA_set_default_method(const DSA_METHOD *meth); 17e1051a39Sopenharmony_ci 18e1051a39Sopenharmony_ci const DSA_METHOD *DSA_get_default_method(void); 19e1051a39Sopenharmony_ci 20e1051a39Sopenharmony_ci int DSA_set_method(DSA *dsa, const DSA_METHOD *meth); 21e1051a39Sopenharmony_ci 22e1051a39Sopenharmony_ci DSA *DSA_new_method(ENGINE *engine); 23e1051a39Sopenharmony_ci 24e1051a39Sopenharmony_ci const DSA_METHOD *DSA_OpenSSL(void); 25e1051a39Sopenharmony_ci 26e1051a39Sopenharmony_ci=head1 DESCRIPTION 27e1051a39Sopenharmony_ci 28e1051a39Sopenharmony_ciAll of the functions described on this page are deprecated. 29e1051a39Sopenharmony_ciApplications should providers instead of method overrides. 30e1051a39Sopenharmony_ci 31e1051a39Sopenharmony_ciA B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA 32e1051a39Sopenharmony_cioperations. By modifying the method, alternative implementations 33e1051a39Sopenharmony_cisuch as hardware accelerators may be used. IMPORTANT: See the NOTES section for 34e1051a39Sopenharmony_ciimportant information about how these DSA API functions are affected by the use 35e1051a39Sopenharmony_ciof B<ENGINE> API calls. 36e1051a39Sopenharmony_ci 37e1051a39Sopenharmony_ciInitially, the default DSA_METHOD is the OpenSSL internal implementation, 38e1051a39Sopenharmony_cias returned by DSA_OpenSSL(). 39e1051a39Sopenharmony_ci 40e1051a39Sopenharmony_ciDSA_set_default_method() makes B<meth> the default method for all DSA 41e1051a39Sopenharmony_cistructures created later. 42e1051a39Sopenharmony_ciB<NB>: This is true only whilst no ENGINE has 43e1051a39Sopenharmony_cibeen set as a default for DSA, so this function is no longer recommended. 44e1051a39Sopenharmony_ciThis function is not thread-safe and should not be called at the same time 45e1051a39Sopenharmony_cias other OpenSSL functions. 46e1051a39Sopenharmony_ci 47e1051a39Sopenharmony_ciDSA_get_default_method() returns a pointer to the current default 48e1051a39Sopenharmony_ciDSA_METHOD. However, the meaningfulness of this result is dependent on 49e1051a39Sopenharmony_ciwhether the ENGINE API is being used, so this function is no longer 50e1051a39Sopenharmony_cirecommended. 51e1051a39Sopenharmony_ci 52e1051a39Sopenharmony_ciDSA_set_method() selects B<meth> to perform all operations using the key 53e1051a39Sopenharmony_ciB<rsa>. This will replace the DSA_METHOD used by the DSA key and if the 54e1051a39Sopenharmony_ciprevious method was supplied by an ENGINE, the handle to that ENGINE will 55e1051a39Sopenharmony_cibe released during the change. It is possible to have DSA keys that only 56e1051a39Sopenharmony_ciwork with certain DSA_METHOD implementations (e.g. from an ENGINE module 57e1051a39Sopenharmony_cithat supports embedded hardware-protected keys), and in such cases 58e1051a39Sopenharmony_ciattempting to change the DSA_METHOD for the key can have unexpected 59e1051a39Sopenharmony_ciresults. See L<DSA_meth_new(3)> for information on constructing custom DSA_METHOD 60e1051a39Sopenharmony_ciobjects; 61e1051a39Sopenharmony_ci 62e1051a39Sopenharmony_ciDSA_new_method() allocates and initializes a DSA structure so that B<engine> 63e1051a39Sopenharmony_ciwill be used for the DSA operations. If B<engine> is NULL, the default engine 64e1051a39Sopenharmony_cifor DSA operations is used, and if no default ENGINE is set, the DSA_METHOD 65e1051a39Sopenharmony_cicontrolled by DSA_set_default_method() is used. 66e1051a39Sopenharmony_ci 67e1051a39Sopenharmony_ci=head1 RETURN VALUES 68e1051a39Sopenharmony_ci 69e1051a39Sopenharmony_ciDSA_OpenSSL() and DSA_get_default_method() return pointers to the respective 70e1051a39Sopenharmony_ciB<DSA_METHOD>s. 71e1051a39Sopenharmony_ci 72e1051a39Sopenharmony_ciDSA_set_default_method() returns no value. 73e1051a39Sopenharmony_ci 74e1051a39Sopenharmony_ciDSA_set_method() returns nonzero if the provided B<meth> was successfully set as 75e1051a39Sopenharmony_cithe method for B<dsa> (including unloading the ENGINE handle if the previous 76e1051a39Sopenharmony_cimethod was supplied by an ENGINE). 77e1051a39Sopenharmony_ci 78e1051a39Sopenharmony_ciDSA_new_method() returns NULL and sets an error code that can be 79e1051a39Sopenharmony_ciobtained by L<ERR_get_error(3)> if the allocation 80e1051a39Sopenharmony_cifails. Otherwise it returns a pointer to the newly allocated structure. 81e1051a39Sopenharmony_ci 82e1051a39Sopenharmony_ci=head1 SEE ALSO 83e1051a39Sopenharmony_ci 84e1051a39Sopenharmony_ciL<DSA_new(3)>, L<DSA_new(3)>, L<DSA_meth_new(3)> 85e1051a39Sopenharmony_ci 86e1051a39Sopenharmony_ci=head1 HISTORY 87e1051a39Sopenharmony_ci 88e1051a39Sopenharmony_ciAll of these functions were deprecated in OpenSSL 3.0. 89e1051a39Sopenharmony_ci 90e1051a39Sopenharmony_ci=head1 COPYRIGHT 91e1051a39Sopenharmony_ci 92e1051a39Sopenharmony_ciCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. 93e1051a39Sopenharmony_ci 94e1051a39Sopenharmony_ciLicensed under the Apache License 2.0 (the "License"). You may not use 95e1051a39Sopenharmony_cithis file except in compliance with the License. You can obtain a copy 96e1051a39Sopenharmony_ciin the file LICENSE in the source distribution or at 97e1051a39Sopenharmony_ciL<https://www.openssl.org/source/license.html>. 98e1051a39Sopenharmony_ci 99e1051a39Sopenharmony_ci=cut 100