]> git.proxmox.com Git - mirror_edk2.git/commit
CryptoPkg: BaseCryptLib: Add unit tests (Host and Shell based)
authorMatthew Carlson <macarl@microsoft.com>
Thu, 8 Oct 2020 22:37:46 +0000 (06:37 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 18 Oct 2020 00:49:58 +0000 (00:49 +0000)
commit694bfd6ff5b9a8352b4ca8634ed4ce449f505991
tree4fb60a6e72cef9d9c6ef07bbbe079e45196d5ba5
parent30f0ec8d80072ae3ab58e08014e6b2ffe3ef97e1
CryptoPkg: BaseCryptLib: Add unit tests (Host and Shell based)

This adds a new INF for BaseCryptLib suitable for
host based environments. It adds a host based unit test for
BaseCryptLib that can also be built as a shell based Unit Test.

In addition, this also adds a UnitTestHostCrtWrapper.c file, which provides
some of the functionality not provided by the default host based unit test
system that OpenSSL expects. This is used by UnitTestHostBaseCryptLib, a
version of the BaseCryptLib meant specifically for host based unit testing.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
33 files changed:
CryptoPkg/CryptoPkg.ci.yaml
CryptoPkg/CryptoPkg.dsc
CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c [new file with mode: 0644]
CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf [new file with mode: 0644]
CryptoPkg/Test/CryptoPkgHostUnitTest.dsc [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/AuthenticodeTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BlockCipherTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/OaepEncryptTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs5Pbkdf2Tests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTestSignatures.h [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RandTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaPkcs7Tests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TSTests.c [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibShell.inf [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/ChainCreationInstructions.txt [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/CreateTestCerts.cmd [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/SignFirmwareWithEKUs.cmd [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingIssuingCA.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingLeafSigner.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingLeafSignerPid1.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingLeafSignerPid12345.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingNoEKUsInSigner.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingPolicyCA.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsingRoot.ini [new file with mode: 0644]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/UnitTestMain.c [new file with mode: 0644]