]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c
CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacSha1.c
index 8126fb525f3586f911f8812ff95d09891313a72f..7593ca55b1328d86b9365ff8c1f7c19acd5c0e10 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HMAC-SHA1 Wrapper Implementation over OpenSSL.\r
 \r
-Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -9,38 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include "InternalCryptLib.h"\r
 #include <openssl/hmac.h>\r
 \r
-//\r
-// NOTE: OpenSSL redefines the size of HMAC_CTX at crypto/hmac/hmac_lcl.h\r
-//       #define HMAC_MAX_MD_CBLOCK_SIZE     144\r
-//\r
-//\r
-#define  HMAC_SHA1_CTX_SIZE   (sizeof(void *) * 4 + sizeof(unsigned int) + \\r
-                             sizeof(unsigned char) * 144)\r
-\r
-/**\r
-  Retrieves the size, in bytes, of the context buffer required for HMAC-SHA1 operations.\r
-  (NOTE: This API is deprecated.\r
-         Use HmacSha1New() / HmacSha1Free() for HMAC-SHA1 Context operations.)\r
-\r
-  @return  The size, in bytes, of the context buffer required for HMAC-SHA1 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacSha1GetContextSize (\r
-  VOID\r
-  )\r
-{\r
-  //\r
-  // Retrieves the OpenSSL HMAC-SHA1 Context Size\r
-  // NOTE: HMAC_CTX object was made opaque in openssl-1.1.x, here we just use the\r
-  //       fixed size as a workaround to make this API work for compatibility.\r
-  //       We should retire HmacSha15GetContextSize() in future, and use HmacSha1New()\r
-  //       and HmacSha1Free() for context allocation and release.\r
-  //\r
-  return (UINTN) HMAC_SHA1_CTX_SIZE;\r
-}\r
-\r
 /**\r
   Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA1 use.\r
 \r