On 01/16/20 07:10, Jian J Wang wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1792 > > Hmac(Md5|Sha1|Sha256)GetContextSize() use a deprecated macro > HMAC_MAX_MD_CBLOCK defined in openssl. They should be dropped to > avoid misuses in the future. For context allocation and release, > use HmacXxxNew() and HmacXxxFree() instead. > > Cc: Xiaoyu Lu <xiaoyux...@intel.com> > Cc: Laszlo Ersek <ler...@redhat.com> > Signed-off-by: Jian J Wang <jian.j.w...@intel.com> > --- > CryptoPkg/Include/Library/BaseCryptLib.h | 17 ---------- > .../Library/BaseCryptLib/Hmac/CryptHmacMd5.c | 31 ------------------ > .../BaseCryptLib/Hmac/CryptHmacMd5Null.c | 20 ------------ > .../Library/BaseCryptLib/Hmac/CryptHmacSha1.c | 32 ------------------- > .../BaseCryptLib/Hmac/CryptHmacSha1Null.c | 20 ------------ > .../BaseCryptLib/Hmac/CryptHmacSha256.c | 31 ------------------ > .../BaseCryptLib/Hmac/CryptHmacSha256Null.c | 20 ------------ > .../BaseCryptLibNull/Hmac/CryptHmacMd5Null.c | 20 ------------ > .../BaseCryptLibNull/Hmac/CryptHmacSha1Null.c | 20 ------------ > .../Hmac/CryptHmacSha256Null.c | 20 ------------ > 10 files changed, 231 deletions(-) > > diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h > b/CryptoPkg/Include/Library/BaseCryptLib.h > index c5803ea673..09fed8b041 100644 > --- a/CryptoPkg/Include/Library/BaseCryptLib.h > +++ b/CryptoPkg/Include/Library/BaseCryptLib.h > @@ -1025,23 +1025,6 @@ Sm3HashAll ( > // MAC (Message Authentication Code) Primitive > > //===================================================================================== > > -/** > - Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 > operations. > - (NOTE: This API is deprecated. > - Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.) > - > - If this interface is not supported, then return zero. > - > - @return The size, in bytes, of the context buffer required for HMAC-MD5 > operations. > - @retval 0 This interface is not supported. > - > -**/ > -UINTN > -EFIAPI > -HmacMd5GetContextSize ( > - VOID > - ); > - > /** > Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use. >
(1) So, according to my review for patch#1, the declarations of the functions: - HmacSha1GetContextSize() - HmacSha256GetContextSize() should be removed from the lib class header in *this* patch (i.e., patch#2), similarly to how HmacMd5GetContextSize() is removed, seen just above in the quote. With (1) fixed: Reviewed-by: Laszlo Ersek <ler...@redhat.com> Thanks! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53305): https://edk2.groups.io/g/devel/message/53305 Mute This Topic: https://groups.io/mt/69742160/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-