Skip to content

Commit

Permalink
Update HMAC() documentation.
Browse files Browse the repository at this point in the history
Fixes #19782

Clarify that EVP_Q_MAC() can be used as an alternative that allows
setting of the libctx.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19855)

(cherry picked from commit d1ebd99)
  • Loading branch information
slontis authored and t8m committed Dec 16, 2022
1 parent b46d220 commit 4e98cb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/man3/HMAC.pod
Expand Up @@ -71,6 +71,9 @@ I<evp_md> is a message digest such as EVP_sha1(), EVP_ripemd160() etc.
HMAC does not support variable output length digests such as EVP_shake128() and
EVP_shake256().

HMAC() uses the default B<OSSL_LIB_CTX>.
Use L<EVP_Q_mac(3)> instead if a library context is required.

All of the functions described below are deprecated.
Applications should instead use L<EVP_MAC_CTX_new(3)>, L<EVP_MAC_CTX_free(3)>,
L<EVP_MAC_init(3)>, L<EVP_MAC_update(3)> and L<EVP_MAC_final(3)>
Expand Down
3 changes: 2 additions & 1 deletion doc/man7/migration_guide.pod
Expand Up @@ -1074,7 +1074,8 @@ See L<EVP_MAC(3)>, L<EVP_MAC-HMAC(7)>, L<EVP_MAC-CMAC(7)>, L<EVP_MAC-GMAC(7)>,
L<EVP_MAC-KMAC(7)>, L<EVP_MAC-BLAKE2(7)>, L<EVP_MAC-Poly1305(7)> and
L<EVP_MAC-Siphash(7)> for additional information.

Note that the one-shot method HMAC() is still available for compatibility purposes.
Note that the one-shot method HMAC() is still available for compatibility purposes,
but this can also be replaced by using EVP_Q_MAC if a library context is required.

=head4 Deprecated low-level validation functions

Expand Down

0 comments on commit 4e98cb5

Please sign in to comment.