From bd19d1aa04d14233c037386a2c969b0164c2cc37 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 19 Jul 2016 18:40:14 +0100 Subject: [PATCH] Clarify digest change in HMAC_Init_ex() RT#4603 Reviewed-by: Rich Salz --- doc/crypto/HMAC.pod | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/crypto/HMAC.pod b/doc/crypto/HMAC.pod index fdafec86b9..91d0bdc3d5 100644 --- a/doc/crypto/HMAC.pod +++ b/doc/crypto/HMAC.pod @@ -79,13 +79,17 @@ function B and the key B which is B bytes long. It is deprecated and only included for backward compatibility with OpenSSL 0.9.6b. -HMAC_Init_ex() initializes or reuses a B structure to use -the function B and key B. Either can be NULL, in which -case the existing one will be reused. B must have been created -with HMAC_CTX_new() before the first use of an B in this -function. B. +HMAC_Init_ex() initializes or reuses a B structure to use the hash +function B and key B. If both are NULL (or B is the same +as the previous digest used by B and B is NULL) the existing key is +reused. B must have been created with HMAC_CTX_new() before the first use +of an B in this function. B. + +B NULL and B is not the +same as the previous digest used by B then an error is returned +because reuse of an existing key with a different digest is not supported.> HMAC_Update() can be called repeatedly with chunks of the message to be authenticated (B bytes at B). -- 2.25.1