diff options
author | tb <> | 2024-07-21 08:36:43 +0000 |
---|---|---|
committer | tb <> | 2024-07-21 08:36:43 +0000 |
commit | 4688a563b5da8909cc64fcc7369b1ec5491d5d58 (patch) | |
tree | ed0c4a447622751595335dd0ea2ec812761b3861 /src/lib/libcrypto/man/EVP_DigestInit.3 | |
parent | bb0cbaff332e2117f157bdcb8acfe6689a081e39 (diff) | |
download | openbsd-4688a563b5da8909cc64fcc7369b1ec5491d5d58.tar.gz openbsd-4688a563b5da8909cc64fcc7369b1ec5491d5d58.tar.bz2 openbsd-4688a563b5da8909cc64fcc7369b1ec5491d5d58.zip |
Unify description of the obsolete ENGINE parameter
This uses the same language in most manuals mentioning the obsolete
ENGINE parameters. Make it clear that it is always ignored and that
NULL should be passed. Always call it engine instead of a mix of e
pe, impl, eng.
Diffstat (limited to 'src/lib/libcrypto/man/EVP_DigestInit.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_DigestInit.3 | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/src/lib/libcrypto/man/EVP_DigestInit.3 b/src/lib/libcrypto/man/EVP_DigestInit.3 index bb7a847d4f..c825725009 100644 --- a/src/lib/libcrypto/man/EVP_DigestInit.3 +++ b/src/lib/libcrypto/man/EVP_DigestInit.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.33 2024/03/19 17:34:05 tb Exp $ | 1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.34 2024/07/21 08:36:43 tb Exp $ |
2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 | 2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 |
3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -70,7 +70,7 @@ | |||
70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
72 | .\" | 72 | .\" |
73 | .Dd $Mdocdate: March 19 2024 $ | 73 | .Dd $Mdocdate: July 21 2024 $ |
74 | .Dt EVP_DIGESTINIT 3 | 74 | .Dt EVP_DIGESTINIT 3 |
75 | .Os | 75 | .Os |
76 | .Sh NAME | 76 | .Sh NAME |
@@ -132,7 +132,7 @@ | |||
132 | .Fo EVP_DigestInit_ex | 132 | .Fo EVP_DigestInit_ex |
133 | .Fa "EVP_MD_CTX *ctx" | 133 | .Fa "EVP_MD_CTX *ctx" |
134 | .Fa "const EVP_MD *type" | 134 | .Fa "const EVP_MD *type" |
135 | .Fa "ENGINE *impl" | 135 | .Fa "ENGINE *engine" |
136 | .Fc | 136 | .Fc |
137 | .Ft int | 137 | .Ft int |
138 | .Fo EVP_DigestUpdate | 138 | .Fo EVP_DigestUpdate |
@@ -153,7 +153,7 @@ | |||
153 | .Fa "unsigned char *md" | 153 | .Fa "unsigned char *md" |
154 | .Fa "unsigned int *s" | 154 | .Fa "unsigned int *s" |
155 | .Fa "const EVP_MD *type" | 155 | .Fa "const EVP_MD *type" |
156 | .Fa "ENGINE *impl" | 156 | .Fa "ENGINE *engine" |
157 | .Fc | 157 | .Fc |
158 | .Ft int | 158 | .Ft int |
159 | .Fo EVP_MD_CTX_copy_ex | 159 | .Fo EVP_MD_CTX_copy_ex |
@@ -249,21 +249,16 @@ respectively. | |||
249 | sets up the digest context | 249 | sets up the digest context |
250 | .Fa ctx | 250 | .Fa ctx |
251 | to use a digest | 251 | to use a digest |
252 | .Fa type | 252 | .Fa type . |
253 | from | ||
254 | .Vt ENGINE | ||
255 | .Fa impl . | ||
256 | The | 253 | The |
257 | .Fa type | 254 | .Fa type |
258 | will typically be supplied by a function such as | 255 | will typically be supplied by a function such as |
259 | .Fn EVP_sha512 . | 256 | .Fn EVP_sha512 . |
260 | If | 257 | The |
261 | .Fa impl | 258 | .Fa ENGINE *engine |
262 | is | 259 | argument is always ignored and passing |
263 | .Dv NULL , | 260 | .Dv NULL |
264 | then the default implementation of digest | 261 | is recommended. |
265 | .Fa type | ||
266 | is used. | ||
267 | .Pp | 262 | .Pp |
268 | .Fn EVP_DigestUpdate | 263 | .Fn EVP_DigestUpdate |
269 | hashes | 264 | hashes |
@@ -306,9 +301,6 @@ bytes of data at | |||
306 | .Fa d | 301 | .Fa d |
307 | using the digest | 302 | using the digest |
308 | .Fa type | 303 | .Fa type |
309 | from | ||
310 | .Vt ENGINE | ||
311 | .Fa impl | ||
312 | in a one-shot operation and place the digest value into | 304 | in a one-shot operation and place the digest value into |
313 | .Fa md , | 305 | .Fa md , |
314 | and, unless | 306 | and, unless |
@@ -323,6 +315,11 @@ This wrapper uses a temporary digest context and passes its arguments to | |||
323 | and | 315 | and |
324 | .Fn EVP_DigestFinal_ex | 316 | .Fn EVP_DigestFinal_ex |
325 | internally. | 317 | internally. |
318 | The | ||
319 | .Fa ENGINE *engine | ||
320 | argument is always ignored and passing | ||
321 | .Dv NULL | ||
322 | is recommended. | ||
326 | .Pp | 323 | .Pp |
327 | .Fn EVP_MD_CTX_copy_ex | 324 | .Fn EVP_MD_CTX_copy_ex |
328 | can be used to copy the message digest state from | 325 | can be used to copy the message digest state from |
@@ -335,8 +332,7 @@ differ in the last few bytes. | |||
335 | .Fn EVP_DigestInit | 332 | .Fn EVP_DigestInit |
336 | is a deprecated function behaving like | 333 | is a deprecated function behaving like |
337 | .Fn EVP_DigestInit_ex | 334 | .Fn EVP_DigestInit_ex |
338 | except that it always uses the default digest implementation | 335 | except that it requires |
339 | and that it requires | ||
340 | .Fn EVP_MD_CTX_reset | 336 | .Fn EVP_MD_CTX_reset |
341 | before it can be used on a context that was already used. | 337 | before it can be used on a context that was already used. |
342 | .Pp | 338 | .Pp |
@@ -399,11 +395,11 @@ in preference to the low-level interfaces. | |||
399 | This is because the code then becomes transparent to the digest used and | 395 | This is because the code then becomes transparent to the digest used and |
400 | much more flexible. | 396 | much more flexible. |
401 | .Pp | 397 | .Pp |
402 | For most applications the | 398 | The |
403 | .Fa impl | 399 | .Fa ENGINE *engine |
404 | parameter to | 400 | argument is always ignored and passing |
405 | .Fn EVP_DigestInit_ex | 401 | .Dv NULL |
406 | will be set to NULL to use the default digest implementation. | 402 | is recommended. |
407 | .Pp | 403 | .Pp |
408 | The functions | 404 | The functions |
409 | .Fn EVP_DigestInit , | 405 | .Fn EVP_DigestInit , |
@@ -418,8 +414,7 @@ New applications should use | |||
418 | and | 414 | and |
419 | .Fn EVP_MD_CTX_copy_ex | 415 | .Fn EVP_MD_CTX_copy_ex |
420 | because they can efficiently reuse a digest context instead of | 416 | because they can efficiently reuse a digest context instead of |
421 | initializing and cleaning it up on each call and allow non-default | 417 | initializing and cleaning it up on each call. |
422 | implementations of digests to be specified. | ||
423 | .Pp | 418 | .Pp |
424 | If digest contexts are not cleaned up after use, memory leaks will occur. | 419 | If digest contexts are not cleaned up after use, memory leaks will occur. |
425 | .Sh RETURN VALUES | 420 | .Sh RETURN VALUES |