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