]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
DOC: Clarify EVP_MAC_init() params vs. EVP_MAC_CTX_set_params()
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 20 Apr 2021 06:30:47 +0000 (08:30 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 21 Apr 2021 12:12:54 +0000 (14:12 +0200)
Fixes #14855

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14937)

doc/man3/EVP_MAC.pod

index 2a8fb5332e737abdc9dc8dfe4c9a9ef2617993a1..b6b5430a35f2fdb5cc6a1d183be591e1c5955714 100644 (file)
@@ -118,12 +118,15 @@ I<ctx>.
 
 =head2 Computing functions
 
-EVP_MAC_init() sets up the underlying context with information given
+EVP_MAC_init() sets up the underlying context I<ctx> with information given
 via the I<key> and I<params> arguments.  The MAC I<key> has a length of
 I<keylen> and the parameters in I<params> are processed before setting
-the key.  If I<key> is NULL, the key must be set via params either
+the key.  If I<key> is NULL, the key must be set via I<params> either
 as part of this call or separately using EVP_MAC_CTX_set_params().
-This should be called before calling EVP_MAC_update() and EVP_MAC_final().
+Providing non-NULL I<params> to this function is equivalent to calling
+EVP_MAC_CTX_set_params() with those I<params> for the same I<ctx> beforehand.
+
+EVP_MAC_init() should be called before EVP_MAC_update() and EVP_MAC_final().
 
 EVP_MAC_update() adds I<datalen> bytes from I<data> to the MAC input.