/** @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
#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