]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacSha256.c
index f8fd0b172ad86575e87733ea2d3b29a6e3fafc96..3fdef064f93a4e80ffcfc79674b685aaa1962c6b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HMAC-SHA256 Wrapper Implementation over OpenSSL.\r
 \r
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -9,37 +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
-#define HMAC_SHA256_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-SHA256 operations.\r
-  (NOTE: This API is deprecated.\r
-         Use HmacSha256New() / HmacSha256Free() for HMAC-SHA256 Context operations.)\r
-\r
-  @return  The size, in bytes, of the context buffer required for HMAC-SHA256 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacSha256GetContextSize (\r
-  VOID\r
-  )\r
-{\r
-  //\r
-  // Retrieves the OpenSSL HMAC-SHA256 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 HmacSha256GetContextSize() in future, and use HmacSha256New()\r
-  //       and HmacSha256Free() for context allocation and release.\r
-  //\r
-  return (UINTN)HMAC_SHA256_CTX_SIZE;\r
-}\r
-\r
 /**\r
   Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use.\r
 \r