/** @file\r
HMAC-MD5 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
-#define HMAC_MD5_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-MD5 operations.\r
- (NOTE: This API is deprecated.\r
- Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)\r
-\r
- @return The size, in bytes, of the context buffer required for HMAC-MD5 operations.\r
-\r
-**/\r
-UINTN\r
-EFIAPI\r
-HmacMd5GetContextSize (\r
- VOID\r
- )\r
-{\r
- //\r
- // Retrieves the OpenSSL HMAC-MD5 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 HmacMd5GetContextSize() in future, and use HmacMd5New()\r
- // and HmacMd5Free() for context allocation and release.\r
- //\r
- return (UINTN) HMAC_MD5_CTX_SIZE;\r
-}\r
-\r
/**\r
Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.\r
\r