From: "Laszlo Ersek" <lersek@redhat.com>
To: Jian J Wang <jian.j.wang@intel.com>, devel@edk2.groups.io
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Subject: Re: [PATCH v3 2/2] CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface
Date: Thu, 16 Jan 2020 10:13:22 +0100 [thread overview]
Message-ID: <fee8f374-113b-b4cc-949b-07c2ae5ee3d7@redhat.com> (raw)
In-Reply-To: <20200116061004.636-3-jian.j.wang@intel.com>
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.lu@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Jian J Wang <jian.j.wang@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 <lersek@redhat.com>
Thanks!
Laszlo
next prev parent reply other threads:[~2020-01-16 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 6:10 [PATCH v3 0/2] Remove deprecated code in BaseCryptLib Wang, Jian J
2020-01-16 6:10 ` [PATCH v3 1/2] CryptoPkg/BaseCryptLib: replace HmacXxxInit API with HmacXxxSetKey Wang, Jian J
2020-01-16 9:08 ` Laszlo Ersek
2020-01-17 2:19 ` Wang, Jian J
2020-01-16 6:10 ` [PATCH v3 2/2] CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface Wang, Jian J
2020-01-16 9:13 ` Laszlo Ersek [this message]
2020-01-19 2:04 ` [edk2-devel] [PATCH v3 0/2] Remove deprecated code in BaseCryptLib Xiaoyu Lu
2020-01-20 16:25 ` Wang, Jian J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fee8f374-113b-b4cc-949b-07c2ae5ee3d7@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox