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