summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_DigestInit.3
diff options
context:
space:
mode:
authortb <>2024-07-21 08:36:43 +0000
committertb <>2024-07-21 08:36:43 +0000
commit4688a563b5da8909cc64fcc7369b1ec5491d5d58 (patch)
treeed0c4a447622751595335dd0ea2ec812761b3861 /src/lib/libcrypto/man/EVP_DigestInit.3
parentbb0cbaff332e2117f157bdcb8acfe6689a081e39 (diff)
downloadopenbsd-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.349
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.
249sets up the digest context 249sets up the digest context
250.Fa ctx 250.Fa ctx
251to use a digest 251to use a digest
252.Fa type 252.Fa type .
253from
254.Vt ENGINE
255.Fa impl .
256The 253The
257.Fa type 254.Fa type
258will typically be supplied by a function such as 255will typically be supplied by a function such as
259.Fn EVP_sha512 . 256.Fn EVP_sha512 .
260If 257The
261.Fa impl 258.Fa ENGINE *engine
262is 259argument is always ignored and passing
263.Dv NULL , 260.Dv NULL
264then the default implementation of digest 261is recommended.
265.Fa type
266is used.
267.Pp 262.Pp
268.Fn EVP_DigestUpdate 263.Fn EVP_DigestUpdate
269hashes 264hashes
@@ -306,9 +301,6 @@ bytes of data at
306.Fa d 301.Fa d
307using the digest 302using the digest
308.Fa type 303.Fa type
309from
310.Vt ENGINE
311.Fa impl
312in a one-shot operation and place the digest value into 304in a one-shot operation and place the digest value into
313.Fa md , 305.Fa md ,
314and, unless 306and, unless
@@ -323,6 +315,11 @@ This wrapper uses a temporary digest context and passes its arguments to
323and 315and
324.Fn EVP_DigestFinal_ex 316.Fn EVP_DigestFinal_ex
325internally. 317internally.
318The
319.Fa ENGINE *engine
320argument is always ignored and passing
321.Dv NULL
322is recommended.
326.Pp 323.Pp
327.Fn EVP_MD_CTX_copy_ex 324.Fn EVP_MD_CTX_copy_ex
328can be used to copy the message digest state from 325can 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
336is a deprecated function behaving like 333is a deprecated function behaving like
337.Fn EVP_DigestInit_ex 334.Fn EVP_DigestInit_ex
338except that it always uses the default digest implementation 335except that it requires
339and that it requires
340.Fn EVP_MD_CTX_reset 336.Fn EVP_MD_CTX_reset
341before it can be used on a context that was already used. 337before 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.
399This is because the code then becomes transparent to the digest used and 395This is because the code then becomes transparent to the digest used and
400much more flexible. 396much more flexible.
401.Pp 397.Pp
402For most applications the 398The
403.Fa impl 399.Fa ENGINE *engine
404parameter to 400argument is always ignored and passing
405.Fn EVP_DigestInit_ex 401.Dv NULL
406will be set to NULL to use the default digest implementation. 402is recommended.
407.Pp 403.Pp
408The functions 404The functions
409.Fn EVP_DigestInit , 405.Fn EVP_DigestInit ,
@@ -418,8 +414,7 @@ New applications should use
418and 414and
419.Fn EVP_MD_CTX_copy_ex 415.Fn EVP_MD_CTX_copy_ex
420because they can efficiently reuse a digest context instead of 416because they can efficiently reuse a digest context instead of
421initializing and cleaning it up on each call and allow non-default 417initializing and cleaning it up on each call.
422implementations of digests to be specified.
423.Pp 418.Pp
424If digest contexts are not cleaned up after use, memory leaks will occur. 419If digest contexts are not cleaned up after use, memory leaks will occur.
425.Sh RETURN VALUES 420.Sh RETURN VALUES