VOID\r
);\r
\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_HMAC_FREE)(\r
+ IN VOID *HashContext\r
+ );\r
+\r
typedef\r
BOOLEAN\r
(EFIAPI *EFI_HMAC_INIT)(\r
typedef struct {\r
UINT32 DigestSize;\r
EFI_HMAC_NEW HmacNew;\r
+ EFI_HMAC_FREE HmacFree;\r
EFI_HMAC_INIT HmacInit;\r
EFI_HMAC_UPDATE HmacUpdate;\r
EFI_HMAC_FINAL HmacFinal;\r
} HMAC_TEST_CONTEXT;\r
\r
// These functions have been deprecated but they've been left commented out for future reference\r
-// HMAC_TEST_CONTEXT mHmacMd5TestCtx = {MD5_DIGEST_SIZE, HmacMd5New, HmacMd5SetKey, HmacMd5Update, HmacMd5Final, HmacMd5Key, sizeof(HmacMd5Key), HmacMd5Digest};\r
-// HMAC_TEST_CONTEXT mHmacSha1TestCtx = {SHA1_DIGEST_SIZE, HmacSha1New, HmacSha1SetKey, HmacSha1Update, HmacSha1Final, HmacSha1Key, sizeof(HmacSha1Key), HmacSha1Digest};\r
-HMAC_TEST_CONTEXT mHmacSha256TestCtx = { SHA256_DIGEST_SIZE, HmacSha256New, HmacSha256SetKey, HmacSha256Update, HmacSha256Final, HmacSha256Key, sizeof (HmacSha256Key), HmacSha256Digest };\r
-HMAC_TEST_CONTEXT mHmacSha384TestCtx = { SHA384_DIGEST_SIZE, HmacSha384New, HmacSha384SetKey, HmacSha384Update, HmacSha384Final, HmacSha384Key, sizeof (HmacSha384Key), HmacSha384Digest };\r
+// HMAC_TEST_CONTEXT mHmacMd5TestCtx = {MD5_DIGEST_SIZE, HmacMd5New, HmacMd5Free, HmacMd5SetKey, HmacMd5Update, HmacMd5Final, HmacMd5Key, sizeof(HmacMd5Key), HmacMd5Digest};\r
+// HMAC_TEST_CONTEXT mHmacSha1TestCtx = {SHA1_DIGEST_SIZE, HmacSha1New, HmacSha1Free, HmacSha1SetKey, HmacSha1Update, HmacSha1Final, HmacSha1Key, sizeof(HmacSha1Key), HmacSha1Digest};\r
+HMAC_TEST_CONTEXT mHmacSha256TestCtx = { SHA256_DIGEST_SIZE, HmacSha256New, HmacSha256Free, HmacSha256SetKey, HmacSha256Update, HmacSha256Final, HmacSha256Key, sizeof (HmacSha256Key), HmacSha256Digest };\r
+HMAC_TEST_CONTEXT mHmacSha384TestCtx = { SHA384_DIGEST_SIZE, HmacSha384New, HmacSha384Free, HmacSha384SetKey, HmacSha384Update, HmacSha384Final, HmacSha384Key, sizeof (HmacSha384Key), HmacSha384Digest };\r
\r
UNIT_TEST_STATUS\r
EFIAPI\r
\r
HmacTestContext = Context;\r
if (HmacTestContext->HmacCtx != NULL) {\r
- FreePool (HmacTestContext->HmacCtx);\r
+ HmacTestContext->HmacFree (HmacTestContext->HmacCtx);\r
}\r
}\r
\r