From nobody Tue May 21 22:15:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95508+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95508+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1666629723; cv=none; d=zohomail.com; s=zohoarc; b=FJsKieaaojmj7q1oTqeNr/Z/O8O6+YqMRh7rDXjPmljOXNhKHII+pkA/jOGvXY1s1plxMPJRnWbtIYgrrUSAPDuRknxSQLiVVejm03HpK8rwxAchvuCPNpf0Dp/ZVA6G5oVOPiIsWSAx+7jcip0Sl55Kj1wp7dVIMW0tlUug7IU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666629723; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Cl7Xc8wErB9YRsEoCqIaSS0Ty2ckmrx+rYQ5DGDBttk=; b=h+6uquqBosrAez7GSr8JDkrbVwyWdb/bh3MZF7Bxy+VuEI2ttkzuDlh+m+eHGdfiXcBHS/+4BICwE57z9izR4rh323cpwlM+yH6vM0Fe92/eYS8Mn8BiQlH8Nebav0T+3BtDmHB2v5kqILRmnrbjyRADf8AG4hVwKCw711X827s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95508+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1666629723503540.3308914786545; Mon, 24 Oct 2022 09:42:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fBEbYY1788612xGwLCxuhOlV; Mon, 24 Oct 2022 09:42:03 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.446.1666629721433952119 for ; Mon, 24 Oct 2022 09:42:02 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="307458833" X-IronPort-AV: E=Sophos;i="5.95,209,1661842800"; d="scan'208";a="307458833" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 09:42:02 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="773885642" X-IronPort-AV: E=Sophos;i="5.95,209,1661842800"; d="scan'208";a="773885642" X-Received: from eseverso-mobl1.amr.corp.intel.com (HELO jvang-mobl.amr.corp.intel.com) ([10.212.217.4]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 09:42:01 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang , Nishant C Mistry Subject: [edk2-devel] [PATCH V1 1/2] CryptoPkg: Sha1 functions causing build errors Date: Mon, 24 Oct 2022 09:41:38 -0700 Message-Id: <20221024164139.792-2-judah.vang@intel.com> In-Reply-To: <20221024164139.792-1-judah.vang@intel.com> References: <20221024164139.792-1-judah.vang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,judah.vang@intel.com X-Gm-Message-State: ZHCrizvejkWjYpfakzgEm2qVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666629723; bh=XcJpBW5PV0aDWmbPkfoI/1UiXdzpuQkudqqfrzlpeIo=; h=Cc:Date:From:Reply-To:Subject:To; b=lze8JLxvdEuuPPkaiFvI83bnZtelA9Q8GPK3MOJnQAwwIuwbiyQqXmavE8aDi070d0/ 6Fk+UYwfcxlvdF/2EDSf9GPhE1jx1jwnOS5K8Uu66cLJ8Aka0Pvddu5+rWQZIuh9iZ5Ie 8qhrDO7gDcW3vbCC+tUVNUSTN7aD8YZRPRI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666629725794100005 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3991 Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES is defined. Percolate the #ifndef DiSABLE_SHA1_DEPRECATED_INTERFACES to all the Sha1 functions. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Nishant C Mistry Signed-off-by: Jian J Wang Signed-off-by: Nishant C Mistry Signed-off-by: Judah Vang --- CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c b/CryptoPkg/= Library/BaseHashApiLib/BaseHashApiLib.c index f9796b215865..ede9fa8c09ec 100644 --- a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c +++ b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c @@ -6,7 +6,7 @@ This API, when called, will calculate the Hash using the hashing algorithm specified by PcdHashApiLibPolicy. =20 - Copyright (c) 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2020-2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -33,9 +33,11 @@ HashApiGetContextSize ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1GetContextSize (); break; + #endif =20 case HASH_ALG_SHA256: return Sha256GetContextSize (); @@ -75,9 +77,11 @@ HashApiInit ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Init (HashContext); break; + #endif =20 case HASH_ALG_SHA256: return Sha256Init (HashContext); @@ -119,9 +123,11 @@ HashApiDuplicate ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Duplicate (HashContext, NewHashContext); break; + #endif =20 case HASH_ALG_SHA256: return Sha256Duplicate (HashContext, NewHashContext); @@ -165,9 +171,11 @@ HashApiUpdate ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Update (HashContext, DataToHash, DataToHashLen); break; + #endif =20 case HASH_ALG_SHA256: return Sha256Update (HashContext, DataToHash, DataToHashLen); @@ -209,9 +217,11 @@ HashApiFinal ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Final (HashContext, Digest); break; + #endif =20 case HASH_ALG_SHA256: return Sha256Final (HashContext, Digest); @@ -255,9 +265,11 @@ HashApiHashAll ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1HashAll (DataToHash, DataToHashLen, Digest); break; + #endif =20 case HASH_ALG_SHA256: return Sha256HashAll (DataToHash, DataToHashLen, Digest); --=20 2.35.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#95508): https://edk2.groups.io/g/devel/message/95508 Mute This Topic: https://groups.io/mt/94539163/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 21 22:15:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95509+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95509+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1666629724; cv=none; d=zohomail.com; s=zohoarc; b=B5a1npHPHGozBkBYEPIuFw9BGmaYzmvqjzmG8kWes653Z5wPPWBBdh0S07Jf1GRLUg8U9dAGCq4Vr9AIlZS9GHNfywoOaSrvjDlaYeYRjTuxTn/lphkxLnKm/NzsrH8TP70sgBRUeH2pNUFPEEvyodWZzIHNmSxZqoyoz2P/EpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666629724; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4FOcU3eM+LUaQcbmeRmY7+HSppLHFLWaSgUBs5BUt1o=; b=QC35+sBI/Ba+eELRN+Qy8PYDf+8Bd8KvzVE8zO6Bjd/pSeMslHIUiVLtlsH12EPkzuQw0XSZmXwSo6PlBEQGClnBXZ0/hka3bIUfYaAkYpFC0dhwW3zN/OB7mt5EdWR3lNgMLd2cmz7wYpvaXdEWpkN9BoEz+hDTdNJBajty7wY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95509+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1666629724446509.4857346707198; Mon, 24 Oct 2022 09:42:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Ubf2YY1788612xeWtk0CqMIh; Mon, 24 Oct 2022 09:42:04 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.446.1666629721433952119 for ; Mon, 24 Oct 2022 09:42:03 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="307458845" X-IronPort-AV: E=Sophos;i="5.95,209,1661842800"; d="scan'208";a="307458845" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 09:42:03 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="773885658" X-IronPort-AV: E=Sophos;i="5.95,209,1661842800"; d="scan'208";a="773885658" X-Received: from eseverso-mobl1.amr.corp.intel.com (HELO jvang-mobl.amr.corp.intel.com) ([10.212.217.4]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 09:42:02 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang , Nishant C Mistry Subject: [edk2-devel] [PATCH V1 2/2] CryptoPkg: Need to enable crypto functions Date: Mon, 24 Oct 2022 09:41:39 -0700 Message-Id: <20221024164139.792-3-judah.vang@intel.com> In-Reply-To: <20221024164139.792-1-judah.vang@intel.com> References: <20221024164139.792-1-judah.vang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,judah.vang@intel.com X-Gm-Message-State: vHgDa9ZL2YW0l1L9grS7uBMox1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666629724; bh=FHgN1iIyELwbxokdw5Eh9UuO+0DHhRkAsL8oSJTc0sU=; h=Cc:Date:From:Reply-To:Subject:To; b=gbPoI7ws60SOQ6J3AbUfKy+9jBPxwUdleXkpQtkWMbeb7BsZAMXCD/7kd6OFIQDXl/N YBIlyNn4F9bE9p1k1+ZGIls27OK6Wnb8tztY3tOe0YU/BRYnJg7JliDr0V9Ym5WT+GQJS KeOsD9pG66Jqemwu1qvEyTScf2VOGaC8PpQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666629725781100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3992 Enable CryptAes for PEI phase. Enable CryptHkdf for SMM phase. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Nishant C Mistry Signed-off-by: Jian J Wang Signed-off-by: Nishant C Mistry Signed-off-by: Judah Vang --- CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 2 +- CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/PeiCryptLib.inf index b1629647f9c6..ee5f3cd5d4b6 100644 --- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf @@ -43,7 +43,7 @@ [Sources] Hash/CryptParallelHashNull.c Hmac/CryptHmac.c Kdf/CryptHkdf.c - Cipher/CryptAesNull.c + Cipher/CryptAes.c Cipher/CryptAeadAesGcmNull.c Pk/CryptRsaBasic.c Pk/CryptRsaExtNull.c diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/SmmCryptLib.inf index 0af7a3f96e8f..cc5a53ca92cd 100644 --- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf @@ -43,7 +43,7 @@ [Sources] Hash/CryptCShake256.c Hash/CryptParallelHash.c Hmac/CryptHmac.c - Kdf/CryptHkdfNull.c + Kdf/CryptHkdf.c Cipher/CryptAes.c Cipher/CryptAeadAesGcmNull.c Pk/CryptRsaBasic.c --=20 2.35.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#95509): https://edk2.groups.io/g/devel/message/95509 Mute This Topic: https://groups.io/mt/94539166/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-