From: Dr. David von Oheimb Date: Tue, 20 Apr 2021 06:30:47 +0000 (+0200) Subject: DOC: Clarify EVP_MAC_init() params vs. EVP_MAC_CTX_set_params() X-Git-Tag: openssl-3.0.0-alpha15~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0e724fcbe3b78f098534fd5b76c1d0393b2a42c;p=thirdparty%2Fopenssl.git 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) --- diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod index 2a8fb5332e7..b6b5430a35f 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.