From: Dr. Stephen Henson Date: Tue, 19 Jul 2016 17:40:14 +0000 (+0100) Subject: Clarify digest change in HMAC_Init_ex() X-Git-Tag: OpenSSL_1_1_0-pre6~121 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd19d1aa04d14233c037386a2c969b0164c2cc37;p=oweals%2Fopenssl.git Clarify digest change in HMAC_Init_ex() RT#4603 Reviewed-by: Rich Salz --- 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).