14 {
"EKU verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mPkcs7EkuTestNum, mPkcs7EkuTest },
15 {
"HASH verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mHashTestNum, mHashTest },
16 {
"HMAC verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mHmacTestNum, mHmacTest },
17 {
"BlockCipher verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mBlockCipherTestNum, mBlockCipherTest },
18 {
"RSA verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mRsaTestNum, mRsaTest },
19 {
"RSA PSS verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mRsaPssTestNum, mRsaPssTest },
20 {
"RSACert verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mRsaCertTestNum, mRsaCertTest },
21 {
"PKCS7 verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mPkcs7TestNum, mPkcs7Test },
22 {
"PKCS5 verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mPkcs5TestNum, mPkcs5Test },
23 {
"Authenticode verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mAuthenticodeTestNum, mAuthenticodeTest },
24 {
"ImageTimestamp verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mImageTimestampTestNum, mImageTimestampTest },
25 {
"DH verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mDhTestNum, mDhTest },
26 {
"PRNG verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mPrngTestNum, mPrngTest },
27 {
"OAEP encrypt verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mOaepTestNum, mOaepTest },
28 {
"Hkdf extract and expand tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mHkdfTestNum, mHkdfTest },
29 {
"Aead AES Gcm tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mAeadAesGcmTestNum, mAeadAesGcmTest },
30 {
"Bn verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mBnTestNum, mBnTest },
31 {
"EC verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mEcTestNum, mEcTest },
32 {
"X509 Verify tests",
"CryptoPkg.BaseCryptLib",
NULL,
NULL, &mX509TestNum, mX509Test },
38 IN CHAR8 *UnitTestName,
39 IN CHAR8 *UnitTestVersion,
40 IN OUT UNIT_TEST_FRAMEWORK_HANDLE *Framework
47 if ((Framework ==
NULL) || (UnitTestVersion ==
NULL) || (UnitTestName ==
NULL)) {
48 return EFI_INVALID_PARAMETER;
56 if (EFI_ERROR (Status)) {
57 DEBUG ((DEBUG_ERROR,
"Failed in InitUnitTestFramework. Status = %r\n", Status));
61 for (SuiteIndex = 0; SuiteIndex <
ARRAY_SIZE (mSuiteDesc); SuiteIndex++) {
62 UNIT_TEST_SUITE_HANDLE Suite =
NULL;
63 Status =
CreateUnitTestSuite (&Suite, *Framework, mSuiteDesc[SuiteIndex].Title, mSuiteDesc[SuiteIndex].Package, mSuiteDesc[SuiteIndex].Sup, mSuiteDesc[SuiteIndex].Tdn);
64 if (EFI_ERROR (Status)) {
65 Status = EFI_OUT_OF_RESOURCES;
69 for (TestIndex = 0; TestIndex < *mSuiteDesc[SuiteIndex].TestNum; TestIndex++) {
70 AddTestCase (Suite, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->Description, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->ClassName, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->Func, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->PreReq, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->CleanUp, (mSuiteDesc[SuiteIndex].TestDesc + TestIndex)->Context);
EFI_STATUS EFIAPI CreateUnitTest(IN CHAR8 *UnitTestName, IN CHAR8 *UnitTestVersion, IN OUT UNIT_TEST_FRAMEWORK_HANDLE *Framework)
#define ARRAY_SIZE(Array)
#define DEBUG(Expression)
EFI_STATUS EFIAPI CreateUnitTestSuite(OUT UNIT_TEST_SUITE_HANDLE *SuiteHandle, IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN CHAR8 *Title, IN CHAR8 *Name, IN UNIT_TEST_SUITE_SETUP Setup OPTIONAL, IN UNIT_TEST_SUITE_TEARDOWN Teardown OPTIONAL)
EFI_STATUS EFIAPI AddTestCase(IN UNIT_TEST_SUITE_HANDLE SuiteHandle, IN CHAR8 *Description, IN CHAR8 *Name, IN UNIT_TEST_FUNCTION Function, IN UNIT_TEST_PREREQUISITE Prerequisite OPTIONAL, IN UNIT_TEST_CLEANUP CleanUp OPTIONAL, IN UNIT_TEST_CONTEXT Context OPTIONAL)
EFI_STATUS EFIAPI InitUnitTestFramework(OUT UNIT_TEST_FRAMEWORK_HANDLE *FrameworkHandle, IN CHAR8 *Title, IN CHAR8 *ShortTitle, IN CHAR8 *VersionString)