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