Skip to content

Commit

Permalink
CryptoPkg: Add Mbedtls submodule in CI
Browse files Browse the repository at this point in the history
Change CI for new Mbedtls submodule.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Cc: Jiewen Yao <[email protected]>
Cc: Yi Li <[email protected]>
Cc: Xiaoyu Lu <[email protected]>
Cc: Guomin Jiang <[email protected]>
Signed-off-by: Wenxing Hou <[email protected]>
Reviewed-by: Yi Li <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
  • Loading branch information
Wenxing-hou authored and mergify[bot] committed Oct 12, 2023
1 parent c5fedb0 commit 26754b3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .pytool/CISettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ def GetRequiredSubmodules(self):
"MdePkg/Library/BaseFdtLib/libfdt", False))
rs.append(RequiredSubmodule(
"MdePkg/Library/MipiSysTLib/mipisyst", False))
rs.append(RequiredSubmodule(
"CryptoPkg/Library/MbedTlsLib/mbedtls", False))
return rs

def GetName(self):
Expand Down
12 changes: 11 additions & 1 deletion CryptoPkg/CryptoPkg.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,20 @@
# This has OpenSSL interfaces that aren't UEFI spec compliant
"Library/BaseCryptLib/Hash/CryptParallelHash.h",
"Library/Include/fcntl.h",
# This has Mbedtls interfaces that aren't UEFI spec compliant
"Library/Include/stdint.h",
"Library/Include/stubs-32.h",
# These directories contain auto-generated OpenSSL content
"Library/OpensslLib",
"Library/IntrinsicLib",
"Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c"
"Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c",
# mbedtls
"Library/MbedTlsLib/mbedtls",
# This has mbedtls interfaces that aren't UEFI spec compliant
"Library/MbedTlsLib/EcSm2Null.c",
"Library/MbedTlsLib/CrtWrapper.c",
"Library/MbedTlsLib/Include/mbedtls/mbedtls_config.h",
"Library/BaseCryptLibMbedTls/SysCall"
]
},
"CompilerPlugin": {
Expand Down
3 changes: 2 additions & 1 deletion CryptoPkg/CryptoPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
Library/OpensslLib/OpensslGen/include
Library/OpensslLib/OpensslGen/providers/common/include
Library/MbedTlsLib/Include
Library/MbedTlsLib/mbedtls
Library/MbedTlsLib/mbedtls/include
Library/MbedTlsLib/mbedtls/include/mbedtls
Library/MbedTlsLib/mbedtls/library

[LibraryClasses]
## @libraryclass Provides basic library functions for cryptographic primitives.
Expand All @@ -49,6 +49,7 @@
## @libraryclass Provides library functions from the openssl project.
#
OpensslLib|Private/Library/OpensslLib.h
MbedTlsLib|Private/Library/MbedTlsLib.h

## @libraryclass Provides compiler intrinsic functions required to link openssl project.
#
Expand Down
8 changes: 8 additions & 0 deletions CryptoPkg/CryptoPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/SecCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/PeiCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/SmmCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/RuntimeCryptLib.inf
CryptoPkg/Library/BaseCryptLibMbedTls/TestBaseCryptLib.inf
CryptoPkg/Library/MbedTlsLib/MbedTlsLib.inf
CryptoPkg/Library/MbedTlsLib/MbedTlsLibFull.inf
CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
CryptoPkg/Library/TlsLib/TlsLib.inf
Expand Down
12 changes: 12 additions & 0 deletions CryptoPkg/Private/Library/MbedTlsLib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @file
MbedTlsLib class with APIs from the mbedtls project
Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef MBEDTLS_LIB_H_
#define MBEDTLS_LIB_H_

#endif

0 comments on commit 26754b3

Please sign in to comment.