summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/DSA_set_method.pod
diff options
context:
space:
mode:
authormarkus <>2002-09-14 11:18:04 +0000
committermarkus <>2002-09-14 11:18:04 +0000
commit3a3a489a756f2852d798376f20cc0d4ab609c866 (patch)
tree2a4277fc9b7635e82c33faa3bae9f9380bc639e8 /src/lib/libcrypto/doc/DSA_set_method.pod
parent82d2611e1bb67683df1bb201dcc2afbff4c76980 (diff)
downloadopenbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.gz
openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.bz2
openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.zip
merge with openssl-0.9.7-stable-SNAP-20020911,
new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@
Diffstat (limited to 'src/lib/libcrypto/doc/DSA_set_method.pod')
-rw-r--r--src/lib/libcrypto/doc/DSA_set_method.pod91
1 files changed, 58 insertions, 33 deletions
diff --git a/src/lib/libcrypto/doc/DSA_set_method.pod b/src/lib/libcrypto/doc/DSA_set_method.pod
index 36a1052d27..bc3cfb1f0a 100644
--- a/src/lib/libcrypto/doc/DSA_set_method.pod
+++ b/src/lib/libcrypto/doc/DSA_set_method.pod
@@ -2,7 +2,7 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5DSA_set_default_openssl_method, DSA_get_default_openssl_method, 5DSA_set_default_method, DSA_get_default_method,
6DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method 6DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
7 7
8=head1 SYNOPSIS 8=head1 SYNOPSIS
@@ -10,11 +10,11 @@ DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
10 #include <openssl/dsa.h> 10 #include <openssl/dsa.h>
11 #include <openssl/engine.h> 11 #include <openssl/engine.h>
12 12
13 void DSA_set_default_openssl_method(DSA_METHOD *meth); 13 void DSA_set_default_method(const DSA_METHOD *meth);
14 14
15 DSA_METHOD *DSA_get_default_openssl_method(void); 15 const DSA_METHOD *DSA_get_default_method(void);
16 16
17 int DSA_set_method(DSA *dsa, ENGINE *engine); 17 int DSA_set_method(DSA *dsa, const DSA_METHOD *meth);
18 18
19 DSA *DSA_new_method(ENGINE *engine); 19 DSA *DSA_new_method(ENGINE *engine);
20 20
@@ -24,26 +24,35 @@ DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
24 24
25A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA 25A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA
26operations. By modifying the method, alternative implementations 26operations. By modifying the method, alternative implementations
27such as hardware accelerators may be used. 27such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
28 28important information about how these DSA API functions are affected by the use
29Initially, the default is to use the OpenSSL internal implementation. 29of B<ENGINE> API calls.
30DSA_OpenSSL() returns a pointer to that method. 30
31 31Initially, the default DSA_METHOD is the OpenSSL internal implementation,
32DSA_set_default_openssl_method() makes B<meth> the default method for 32as returned by DSA_OpenSSL().
33all DSA structures created later. B<NB:> This is true only whilst the 33
34default engine for DSA operations remains as "openssl". ENGINEs 34DSA_set_default_method() makes B<meth> the default method for all DSA
35provide an encapsulation for implementations of one or more algorithms at a 35structures created later. B<NB>: This is true only whilst no ENGINE has
36time, and all the DSA functions mentioned here operate within the scope 36been set as a default for DSA, so this function is no longer recommended.
37of the default "openssl" engine. 37
38 38DSA_get_default_method() returns a pointer to the current default
39DSA_get_default_openssl_method() returns a pointer to the current default 39DSA_METHOD. However, the meaningfulness of this result is dependant on
40method for the "openssl" engine. 40whether the ENGINE API is being used, so this function is no longer
41 41recommended.
42DSA_set_method() selects B<engine> for all operations using the structure B<dsa>. 42
43 43DSA_set_method() selects B<meth> to perform all operations using the key
44DSA_new_method() allocates and initializes a DSA structure so that 44B<rsa>. This will replace the DSA_METHOD used by the DSA key and if the
45B<engine> will be used for the DSA operations. If B<engine> is NULL, 45previous method was supplied by an ENGINE, the handle to that ENGINE will
46the default engine for DSA operations is used. 46be released during the change. It is possible to have DSA keys that only
47work with certain DSA_METHOD implementations (eg. from an ENGINE module
48that supports embedded hardware-protected keys), and in such cases
49attempting to change the DSA_METHOD for the key can have unexpected
50results.
51
52DSA_new_method() allocates and initializes a DSA structure so that B<engine>
53will be used for the DSA operations. If B<engine> is NULL, the default engine
54for DSA operations is used, and if no default ENGINE is set, the DSA_METHOD
55controlled by DSA_set_default_method() is used.
47 56
48=head1 THE DSA_METHOD STRUCTURE 57=head1 THE DSA_METHOD STRUCTURE
49 58
@@ -89,18 +98,29 @@ struct
89 98
90=head1 RETURN VALUES 99=head1 RETURN VALUES
91 100
92DSA_OpenSSL() and DSA_get_default_openssl_method() return pointers to the 101DSA_OpenSSL() and DSA_get_default_method() return pointers to the respective
93respective B<DSA_METHOD>s. 102B<DSA_METHOD>s.
94 103
95DSA_set_default_openssl_method() returns no value. 104DSA_set_default_method() returns no value.
96 105
97DSA_set_method() returns non-zero if the ENGINE associated with B<dsa> 106DSA_set_method() returns non-zero if the provided B<meth> was successfully set as
98was successfully changed to B<engine>. 107the method for B<dsa> (including unloading the ENGINE handle if the previous
108method was supplied by an ENGINE).
99 109
100DSA_new_method() returns NULL and sets an error code that can be 110DSA_new_method() returns NULL and sets an error code that can be
101obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation 111obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation
102fails. Otherwise it returns a pointer to the newly allocated structure. 112fails. Otherwise it returns a pointer to the newly allocated structure.
103 113
114=head1 NOTES
115
116As of version 0.9.7, DSA_METHOD implementations are grouped together with other
117algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a
118default ENGINE is specified for DSA functionality using an ENGINE API function,
119that will override any DSA defaults set using the DSA API (ie.
120DSA_set_default_method()). For this reason, the ENGINE API is the recommended way
121to control default implementations for use in DSA and other cryptographic
122algorithms.
123
104=head1 SEE ALSO 124=head1 SEE ALSO
105 125
106L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)> 126L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)>
@@ -110,9 +130,14 @@ L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)>
110DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), 130DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(),
111DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. 131DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4.
112 132
113DSA_set_default_openssl_method() and DSA_get_default_openssl_method() 133DSA_set_default_openssl_method() and DSA_get_default_openssl_method() replaced
114replaced DSA_set_default_method() and DSA_get_default_method() respectively, 134DSA_set_default_method() and DSA_get_default_method() respectively, and
115and DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s 135DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s rather than
116rather than B<DSA_METHOD>s during development of OpenSSL 0.9.6. 136B<DSA_METHOD>s during development of the engine version of OpenSSL 0.9.6. For
1370.9.7, the handling of defaults in the ENGINE API was restructured so that this
138change was reversed, and behaviour of the other functions resembled more closely
139the previous behaviour. The behaviour of defaults in the ENGINE API now
140transparently overrides the behaviour of defaults in the DSA API without
141requiring changing these function prototypes.
117 142
118=cut 143=cut