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