From b880283683958c873ce8363892c44277ec5081f8 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 22 Jul 2016 14:11:13 +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 58a57f47bb..2c8f20a201 100644 --- a/doc/crypto/hmac.pod +++ b/doc/crypto/hmac.pod @@ -60,13 +60,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. HMAC_CTX_init() must have been -called 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