CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Unit test fixes

* Update ImageTimeStampTest to return UNIT_TEST_PASSED instead of
  Status.  On success Status is TRUE(1), which was returning a unit
  test status of UNIT_TEST_ERROR_PREREQUISITE_NOT_MET.
* Update HmacTests to use the *Free() service from the HMAC family
  instead of FreePool().  Using FreePool() generates ASSERT() because
  the context being freed was not allocated using AllocatePool().

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Christopher Zurcher <christopher.zurcher@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Michael D Kinney
2022-09-30 13:59:30 -07:00
committed by mergify[bot]
parent 8f8372439d
commit 961fadf60c
2 changed files with 13 additions and 6 deletions

View File

@@ -322,7 +322,7 @@ TestVerifyImageTimestampVerify (
UT_ASSERT_EQUAL (SigningTime.Minute, 50);
UT_ASSERT_EQUAL (SigningTime.Second, 3);
return Status;
return UNIT_TEST_PASSED;
}
TEST_DESC mImageTimestampTest[] = {