From c0e724fcbe3b78f098534fd5b76c1d0393b2a42c Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Tue, 20 Apr 2021 08:30:47 +0200 Subject: [PATCH] DOC: Clarify EVP_MAC_init() params vs. EVP_MAC_CTX_set_params() Fixes #14855 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14937) --- doc/man3/EVP_MAC.pod | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod index 2a8fb5332e..b6b5430a35 100644 --- a/doc/man3/EVP_MAC.pod +++ b/doc/man3/EVP_MAC.pod @@ -118,12 +118,15 @@ I. =head2 Computing functions -EVP_MAC_init() sets up the underlying context with information given +EVP_MAC_init() sets up the underlying context I with information given via the I and I arguments. The MAC I has a length of I and the parameters in I are processed before setting -the key. If I is NULL, the key must be set via params either +the key. If I is NULL, the key must be set via I 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 to this function is equivalent to calling +EVP_MAC_CTX_set_params() with those I for the same I beforehand. + +EVP_MAC_init() should be called before EVP_MAC_update() and EVP_MAC_final(). EVP_MAC_update() adds I bytes from I to the MAC input.