diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-09-13 13:00:19 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-23 06:11:25 +0000 |
commit | 1a89c690a1df8a22bd2157be72d438b741c96854 (patch) | |
tree | 15480b354831c28e91c4a7b0edf52ecf16bd5a96 /CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf | |
parent | 1815f35b87f182ca4c5019e9c570f12dbbef61f8 (diff) | |
download | edk2-1a89c690a1df8a22bd2157be72d438b741c96854.tar.gz edk2-1a89c690a1df8a22bd2157be72d438b741c96854.tar.bz2 edk2-1a89c690a1df8a22bd2157be72d438b741c96854.zip |
CryptoPkg/OpensslLib: Create SM3-only version of the library
Create a special OpensslLib implementation that only exposes the SM3
routines that MbedTlsLib borrows from OpensslLib, to avoid having to
pull in other parts of OpenSSL that are not needed (e.g., via the
library constructor)
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf')
-rw-r--r-- | CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf b/CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf new file mode 100644 index 0000000000..9e36490db7 --- /dev/null +++ b/CryptoPkg/Library/OpensslLib/OpensslLibSm3.inf @@ -0,0 +1,30 @@ +## @file
+# Minimal OpensslLib implementation that only provides SM3 and nothing else.
+# Needed by MbedTlsLib.
+#
+# Copyright (c) 2024, Google LLC. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 1.30
+ BASE_NAME = OpensslLibSm3
+ FILE_GUID = 96469bab-9c3f-4a60-a583-71a8bda64ec9
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = OpensslLib
+
+ DEFINE OPENSSL_PATH = openssl
+
+[Sources]
+ $(OPENSSL_PATH)/crypto/sm3/sm3.c
+ OpensslStub/OpensslCleanse.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ CryptoPkg/CryptoPkg.dec
+
+[LibraryClasses]
+ BaseMemoryLib
|