From 9a1f14ad721bbcd833ec5108944c44a502392f03 Mon Sep 17 00:00:00 2001 From: Jian J Wang Date: Fri, 17 Jan 2020 11:06:31 +0800 Subject: CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface 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 Cc: Laszlo Ersek Signed-off-by: Jian J Wang Reviewed-by: Laszlo Ersek Reviewed-by: Xiaoyu Lu --- CryptoPkg/Include/Library/BaseCryptLib.h | 53 +------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) (limited to 'CryptoPkg/Include') diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/Library/BaseCryptLib.h index 5fafcd72bc..8320fddc4c 100644 --- a/CryptoPkg/Include/Library/BaseCryptLib.h +++ b/CryptoPkg/Include/Library/BaseCryptLib.h @@ -4,7 +4,7 @@ primitives (Hash Serials, HMAC, RSA, Diffie-Hellman, etc) for UEFI security functionality enabling. -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -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. @@ -1175,23 +1158,6 @@ HmacMd5Final ( OUT UINT8 *HmacValue ); -/** - Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations. - (NOTE: This API is deprecated. - Use HmacSha1New() / HmacSha1Free() for HMAC-SHA1 Context operations.) - - If this interface is not supported, then return zero. - - @return The size, in bytes, of the context buffer required for HMAC-SHA1 operations. - @retval 0 This interface is not supported. - -**/ -UINTN -EFIAPI -HmacSha1GetContextSize ( - VOID - ); - /** Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA1 use. @@ -1325,23 +1291,6 @@ HmacSha1Final ( OUT UINT8 *HmacValue ); -/** - Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations. - (NOTE: This API is deprecated. - Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.) - - If this interface is not supported, then return zero. - - @return The size, in bytes, of the context buffer required for HMAC-SHA256 operations. - @retval 0 This interface is not supported. - -**/ -UINTN -EFIAPI -HmacSha256GetContextSize ( - VOID - ); - /** Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use. -- cgit v1.2.3