From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B5D97AC159C for ; Thu, 28 Sep 2023 15:34:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WJ9YG2LFicKNqQ225r3Nm46Z0C59zxcWH5T9TVc78+Y=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1695915281; v=1; b=R8B1Nlwa5BhdeQqRL3g7xYUoqIQ7ILZ2M2LA2pZ+ESPUuBvJnSdTgq3aZiUBg99n9ppULIKM h1JPY8qY7rNgTQkt7D110ETx9YJzKzxrB6oMN75qO5tboUJaoKQPV4SJ+C7YcgttqctfBAgrisC S1AaRN2YwoB5JW1mF0uF/RcU= X-Received: by 127.0.0.2 with SMTP id jHADYY7687511xM4sfOqN80K; Thu, 28 Sep 2023 08:34:41 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web10.16607.1695915264250602914 for ; Thu, 28 Sep 2023 08:34:40 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="704030" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="704030" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 08:34:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="778943275" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="778943275" X-Received: from shwdejointd777.ccr.corp.intel.com ([10.239.58.116]) by orsmga008.jf.intel.com with ESMTP; 28 Sep 2023 08:34:39 -0700 From: "Wenxing Hou" To: devel@edk2.groups.io Cc: Jiewen Yao , Yi Li , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [PATCH v3 09/11] CryptoPkg: Add Mbedtls submodule in CI Date: Thu, 28 Sep 2023 23:34:14 +0800 Message-Id: <20230928153416.537-10-wenxing.hou@intel.com> In-Reply-To: <20230928153416.537-1-wenxing.hou@intel.com> References: <20230928153416.537-1-wenxing.hou@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,wenxing.hou@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Ust3h34z8WqmsHQ0T6fuYvUqx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=R8B1Nlwa; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Change CI for new Mbedtls submodule. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4177 Cc: Jiewen Yao Cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .pytool/CISettings.py | 2 ++ CryptoPkg/CryptoPkg.ci.yaml | 12 +++++++++++- CryptoPkg/CryptoPkg.dec | 3 ++- CryptoPkg/CryptoPkg.dsc | 8 ++++++++ CryptoPkg/Private/Library/MbedTlsLib.h | 12 ++++++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 CryptoPkg/Private/Library/MbedTlsLib.h diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index 6fb7342f81..c5803a877c 100644 --- a/.pytool/CISettings.py +++ b/.pytool/CISettings.py @@ -199,6 +199,8 @@ class Settings(CiBuildSettingsManager, UpdateSettingsMa= nager, SetupSettingsManag "MdePkg/Library/BaseFdtLib/libfdt", False))=0D rs.append(RequiredSubmodule(=0D "MdePkg/Library/MipiSysTLib/mipisyst", False))=0D + rs.append(RequiredSubmodule(=0D + "CryptoPkg/Library/MbedTlsLib/mbedtls", False))=0D return rs=0D =0D def GetName(self):=0D diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml index 59ba56d41e..967612230d 100644 --- a/CryptoPkg/CryptoPkg.ci.yaml +++ b/CryptoPkg/CryptoPkg.ci.yaml @@ -38,10 +38,20 @@ # This has OpenSSL interfaces that aren't UEFI spec compliant= =0D "Library/BaseCryptLib/Hash/CryptParallelHash.h",=0D "Library/Include/fcntl.h",=0D + # This has Mbedtls interfaces that aren't UEFI spec compliant= =0D + "Library/Include/stdint.h",=0D + "Library/Include/stubs-32.h",=0D # These directories contain auto-generated OpenSSL content=0D "Library/OpensslLib",=0D "Library/IntrinsicLib",=0D - "Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c"=0D + "Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c",=0D + # mbedtls=0D + "Library/MbedTlsLib/mbedtls",=0D + # This has mbedtls interfaces that aren't UEFI spec compliant= =0D + "Library/MbedTlsLib/EcSm2Null.c",=0D + "Library/MbedTlsLib/CrtWrapper.c",=0D + "Library/MbedTlsLib/Include/mbedtls/mbedtls_config.h",=0D + "Library/BaseCryptLibMbedTls/SysCall"=0D ]=0D },=0D "CompilerPlugin": {=0D diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec index a5fa81a338..e613b6b1ae 100644 --- a/CryptoPkg/CryptoPkg.dec +++ b/CryptoPkg/CryptoPkg.dec @@ -28,9 +28,9 @@ Library/OpensslLib/OpensslGen/include=0D Library/OpensslLib/OpensslGen/providers/common/include=0D Library/MbedTlsLib/Include=0D - Library/MbedTlsLib/mbedtls=0D Library/MbedTlsLib/mbedtls/include=0D Library/MbedTlsLib/mbedtls/include/mbedtls=0D + Library/MbedTlsLib/mbedtls/library=0D =0D [LibraryClasses]=0D ## @libraryclass Provides basic library functions for cryptographic pr= imitives.=0D @@ -49,6 +49,7 @@ ## @libraryclass Provides library functions from the openssl project.= =0D #=0D OpensslLib|Private/Library/OpensslLib.h=0D + MbedTlsLib|Private/Library/MbedTlsLib.h=0D =0D ## @libraryclass Provides compiler intrinsic functions required to lin= k openssl project.=0D #=0D diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc index a55dcb9668..6a0104a3bb 100644 --- a/CryptoPkg/CryptoPkg.dsc +++ b/CryptoPkg/CryptoPkg.dsc @@ -364,6 +364,14 @@ CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf=0D CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf=0D CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/BaseCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/SecCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/PeiCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/SmmCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/RuntimeCryptLib.inf=0D + CryptoPkg/Library/BaseCryptLibMbedTls/TestBaseCryptLib.inf=0D + CryptoPkg/Library/MbedTlsLib/MbedTlsLib.inf=0D + CryptoPkg/Library/MbedTlsLib/MbedTlsLibFull.inf=0D CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf=0D CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D CryptoPkg/Library/TlsLib/TlsLib.inf=0D diff --git a/CryptoPkg/Private/Library/MbedTlsLib.h b/CryptoPkg/Private/Lib= rary/MbedTlsLib.h new file mode 100644 index 0000000000..30517a76d3 --- /dev/null +++ b/CryptoPkg/Private/Library/MbedTlsLib.h @@ -0,0 +1,12 @@ +/** @file=0D + MbedTlsLib class with APIs from the mbedtls project=0D +=0D + Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef MBEDTLS_LIB_H_=0D +#define MBEDTLS_LIB_H_=0D +=0D +#endif=0D --=20 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109161): https://edk2.groups.io/g/devel/message/109161 Mute This Topic: https://groups.io/mt/101639984/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-