diff options
author | schwarze <> | 2018-04-18 01:09:01 +0000 |
---|---|---|
committer | schwarze <> | 2018-04-18 01:09:01 +0000 |
commit | bf38af2d204a66db252db88697e129c75810d022 (patch) | |
tree | 2c4dc10a970df762b139b100fe0cb4b1255f91d6 /src/lib/libcrypto/man/DSA_set_method.3 | |
parent | 3853161947bef78ac2c0d8634299a75cea982c4c (diff) | |
download | openbsd-bf38af2d204a66db252db88697e129c75810d022.tar.gz openbsd-bf38af2d204a66db252db88697e129c75810d022.tar.bz2 openbsd-bf38af2d204a66db252db88697e129c75810d022.zip |
* Make the description of method selection simpler, more precise,
and more concise.
* Correct the description of the return values of DH_set_method(3)
and DSA_set_method(3).
* Stop referencing engine(3).
Diffstat (limited to 'src/lib/libcrypto/man/DSA_set_method.3')
-rw-r--r-- | src/lib/libcrypto/man/DSA_set_method.3 | 96 |
1 files changed, 33 insertions, 63 deletions
diff --git a/src/lib/libcrypto/man/DSA_set_method.3 b/src/lib/libcrypto/man/DSA_set_method.3 index f54c392097..8221f856be 100644 --- a/src/lib/libcrypto/man/DSA_set_method.3 +++ b/src/lib/libcrypto/man/DSA_set_method.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: DSA_set_method.3,v 1.8 2018/03/22 16:06:33 schwarze Exp $ | 1 | .\" $OpenBSD: DSA_set_method.3,v 1.9 2018/04/18 01:09:01 schwarze Exp $ |
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: March 22 2018 $ | 51 | .Dd $Mdocdate: April 18 2018 $ |
52 | .Dt DSA_SET_METHOD 3 | 52 | .Dt DSA_SET_METHOD 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -60,7 +60,6 @@ | |||
60 | .Nd select DSA method | 60 | .Nd select DSA method |
61 | .Sh SYNOPSIS | 61 | .Sh SYNOPSIS |
62 | .In openssl/dsa.h | 62 | .In openssl/dsa.h |
63 | .In openssl/engine.h | ||
64 | .Ft void | 63 | .Ft void |
65 | .Fo DSA_set_default_method | 64 | .Fo DSA_set_default_method |
66 | .Fa "const DSA_METHOD *meth" | 65 | .Fa "const DSA_METHOD *meth" |
@@ -81,51 +80,41 @@ | |||
81 | .Sh DESCRIPTION | 80 | .Sh DESCRIPTION |
82 | A | 81 | A |
83 | .Vt DSA_METHOD | 82 | .Vt DSA_METHOD |
84 | specifies the functions that OpenSSL uses for DSA operations. | 83 | object contains pointers to the functions used for DSA operations. |
85 | By modifying the method, alternative implementations such as hardware | 84 | By default, the internal implementation returned by |
86 | accelerators may be used. | 85 | .Fn DSA_OpenSSL |
87 | See the | 86 | is used. |
88 | .Sx CAVEATS | 87 | By selecting another method, alternative implementations |
89 | section for how these DSA API functions are affected by the use of | 88 | such as hardware accelerators may be used. |
90 | .Xr engine 3 | ||
91 | API calls. | ||
92 | .Pp | ||
93 | Initially, the default | ||
94 | .Vt DSA_METHOD | ||
95 | is the OpenSSL internal implementation, as returned by | ||
96 | .Fn DSA_OpenSSL . | ||
97 | .Pp | 89 | .Pp |
98 | .Fn DSA_set_default_method | 90 | .Fn DSA_set_default_method |
99 | makes | 91 | selects |
100 | .Fa meth | 92 | .Fa meth |
101 | the default method for all | 93 | as the default method for all |
102 | .Vt DSA | 94 | .Vt DSA |
103 | structures created later. | 95 | structures created later. |
104 | .Sy Note : | 96 | If any |
105 | this is true only whilst no | ||
106 | .Vt ENGINE | 97 | .Vt ENGINE |
107 | has been set as a default for DSA, so this function is no longer | 98 | was registered with |
108 | recommended. | 99 | .Xr ENGINE_register_DSA 3 |
100 | that can be successfully initialized, it overrides the default. | ||
109 | .Pp | 101 | .Pp |
110 | .Fn DSA_get_default_method | 102 | .Fn DSA_get_default_method |
111 | returns a pointer to the current default | 103 | returns a pointer to the current default method, |
112 | .Vt DSA_METHOD . | 104 | even if it is actually overridded by an |
113 | However, the meaningfulness of this result is dependent on whether the | 105 | .Vt ENGINE . |
114 | .Xr engine 3 | ||
115 | API is being used, so this function is no longer recommended. | ||
116 | .Pp | 106 | .Pp |
117 | .Fn DSA_set_method | 107 | .Fn DSA_set_method |
118 | selects | 108 | selects |
119 | .Fa meth | 109 | .Fa meth |
120 | to perform all operations using the key | 110 | to perform all operations using the key |
121 | .Fa dsa . | 111 | .Fa dsa . |
122 | This will replace the | 112 | This replaces the |
123 | .Vt DSA_METHOD | 113 | .Vt DSA_METHOD |
124 | used by the DSA key and if the previous method was supplied by an | 114 | used by the DSA key and if the previous method was supplied by an |
125 | .Vt ENGINE , | 115 | .Vt ENGINE , |
126 | the handle to that | 116 | .Xr ENGINE_finish 3 |
127 | .Vt ENGINE | 117 | is called on it. |
128 | will be released during the change. | ||
129 | It is possible to have DSA keys that only work with certain | 118 | It is possible to have DSA keys that only work with certain |
130 | .Vt DSA_METHOD | 119 | .Vt DSA_METHOD |
131 | implementations (e.g. from an | 120 | implementations (e.g. from an |
@@ -140,17 +129,16 @@ allocates and initializes a | |||
140 | .Vt DSA | 129 | .Vt DSA |
141 | structure so that | 130 | structure so that |
142 | .Fa engine | 131 | .Fa engine |
143 | will be used for the DSA operations. | 132 | is used for the DSA operations. |
144 | If | 133 | If |
145 | .Fa engine | 134 | .Fa engine |
146 | is | 135 | is |
147 | .Dv NULL , | 136 | .Dv NULL , |
148 | the default engine for DSA operations is used and, if no | 137 | .Xr ENGINE_get_default_DSA 3 |
149 | default | 138 | is used. |
150 | .Vt ENGINE | 139 | If that returns |
151 | is set, the | 140 | .Dv NULL , |
152 | .Vt DSA_METHOD | 141 | the default method controlled by |
153 | controlled by | ||
154 | .Fn DSA_set_default_method | 142 | .Fn DSA_set_default_method |
155 | is used. | 143 | is used. |
156 | .Pp | 144 | .Pp |
@@ -203,17 +191,11 @@ struct | |||
203 | and | 191 | and |
204 | .Fn DSA_get_default_method | 192 | .Fn DSA_get_default_method |
205 | return pointers to the respective | 193 | return pointers to the respective |
206 | .Vt DSA_METHOD Ns s . | 194 | .Vt DSA_METHOD . |
207 | .Pp | 195 | .Pp |
208 | .Fn DSA_set_method | 196 | .Fn DSA_set_method |
209 | returns non-zero if the provided | 197 | returns 1 on success or 0 on failure. |
210 | .Fa meth | 198 | Currently, it cannot fail. |
211 | was successfully set as the method for | ||
212 | .Fa dsa | ||
213 | (including unloading the | ||
214 | .Vt ENGINE | ||
215 | handle if the previous method was supplied by an | ||
216 | .Vt ENGINE ) . | ||
217 | .Pp | 199 | .Pp |
218 | .Fn DSA_new_method | 200 | .Fn DSA_new_method |
219 | returns | 201 | returns |
@@ -224,7 +206,10 @@ if the allocation fails. | |||
224 | Otherwise it returns a pointer to the newly allocated structure. | 206 | Otherwise it returns a pointer to the newly allocated structure. |
225 | .Sh SEE ALSO | 207 | .Sh SEE ALSO |
226 | .Xr DSA_meth_new 3 , | 208 | .Xr DSA_meth_new 3 , |
227 | .Xr DSA_new 3 | 209 | .Xr DSA_new 3 , |
210 | .Xr ENGINE_get_default_DSA 3 , | ||
211 | .Xr ENGINE_register_DSA 3 , | ||
212 | .Xr ENGINE_set_default_DSA 3 | ||
228 | .Sh HISTORY | 213 | .Sh HISTORY |
229 | .Fn DSA_set_default_method , | 214 | .Fn DSA_set_default_method , |
230 | .Fn DSA_get_default_method , | 215 | .Fn DSA_get_default_method , |
@@ -234,18 +219,3 @@ and | |||
234 | .Fn DSA_OpenSSL | 219 | .Fn DSA_OpenSSL |
235 | first appeared in OpenSSL 0.9.5 and have been available since | 220 | first appeared in OpenSSL 0.9.5 and have been available since |
236 | .Ox 2.7 . | 221 | .Ox 2.7 . |
237 | .Sh CAVEATS | ||
238 | As of version 0.9.7, DSA_METHOD implementations are grouped together | ||
239 | with other algorithmic APIs (e.g. RSA_METHOD, EVP_CIPHER) in | ||
240 | .Vt ENGINE | ||
241 | modules. | ||
242 | If a default | ||
243 | .Vt ENGINE | ||
244 | is specified for DSA functionality using an | ||
245 | .Xr engine 3 | ||
246 | API function, that will override any DSA defaults set using the DSA API | ||
247 | .Pq i.e. DSA_set_default_method . | ||
248 | For this reason, the | ||
249 | .Xr engine 3 | ||
250 | API is the recommended way to control default implementations for | ||
251 | use in DSA and other cryptographic algorithms. | ||