summaryrefslogtreecommitdiff
path: root/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/UnitTestMain.c
AgeCommit message (Collapse)AuthorFilesLines
2025-11-22CryptoPkg: fix various typosPhilipp Schuster1-1/+1
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2025-04-21CryptoPkg: Resolve CodeQL ErrorsOliver Smith-Denny1-1/+6
This patch updates several CodeQL errors for potential null pointer access and unguarded header conclusion across production and test code that have been flagged in the build/security tab in GitHub. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-03-07CryptoPkg/Library/OpensslLib: Fix CLANG compatibility issuesMichael D Kinney1-20/+1
Update the CryptoPkg to support CLANGPDB and CLANGDWARF from both Windows and Linux host environments. * Add PcdOpensslLibAssemblySourceStyleNasm to select the correct optimized assembly source style for OpensslLib for IA32/X64. NASM style is for MSFT and CLANGPDB. GAS style is for GCC. Use this PCD in OpensslLibAccel.inf and OpensslLibFullAccel.inf to select between .nasm and .S files. * Add intrinsic functions required by CLANG IA32/X64 builds. * __ashlti3 * __lshrdi3 * Disable warning -Wno-error=unused-function for CLANG build compatibility * Set -D OPENSSL_NO_INLINE_ASM for CLANG build compatibility * Update TestBaseCryptLib to split out the implementation of main() into its own C file that is only use for host-based unit tests. This is due to CLANGPDB for host environments injecting a __main() call that can only be resolved in host based builds that link against host libraries. * Update Configure.py to update IA32/X64 [Sources] sections with feature flag expressions using the new PCD PcdOpensslLibAssemblySourceStyleNasm. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2024-06-14CryptoPkg/Test: call ProcessLibraryConstructorListGerd Hoffmann1-0/+7
Needed to properly initialize BaseRngLib. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-12-07CryptoPkg: Apply uncrustify changesMichael Kubacki1-5/+4
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the CryptoPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2020-10-18CryptoPkg: BaseCryptLib: Add unit tests (Host and Shell based)Matthew Carlson1-0/+81
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>