From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.3126.1667870769767497785 for ; Mon, 07 Nov 2022 17:26:10 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UYOo2eKw; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667870769; x=1699406769; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kKAL18c8t9jpnDhDIG9qezMJGcesZlde/BC+OlgSS60=; b=UYOo2eKwxBoRRu7rH4IS0asJr3f+8KJfIQ6CS2PM9Vhc97Qe6jmRdxmo WzrAuu/dwK38Ezy24oL79YpyHU3TXD0+8V/3rmen5YUS91f8IdcB38OQf AGSfT0H/igpJw2ybTgdIH9JwmMTOFAzefMWpu+fyBis0RWhjLq27i6Jzw BBeFcy+06srxtnHIpK5VfBE/ltyKfOPUcjQXgG5vtmKAdMFcLNs0rL9tR v6ICi8+FcTQk5XycCmNbxgRVb3ggmWHPU85ANHtfWNFLLRiowYu4Otdho XOOr1jgRbjvx0tRcTJK8K7uawryoomFUuVMVYfzPVcYUPJJDOpfufz67F Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="374842991" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="374842991" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 17:26:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="741738075" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="741738075" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 07 Nov 2022 17:26:08 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 17:26:08 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 7 Nov 2022 17:26:08 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 7 Nov 2022 17:26:08 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 7 Nov 2022 17:26:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ijJ2DzxfV/dzpUCTEM7NsOTsJCN0mg1RQFRTH/DZIqDC+vpm50AtiaJrDZDSndUYCJuh9BuHbL+mfV5WRIDutQlgKLoxhohlf2l3o5HjU++kTZxmZi2o3D3HorwTK880cNN7mumnIqMH2k3oFSsubP9Yzp92h691SNvpAj3vcGgZ1bS3XRTuthYeyAhu3kMLdseJgIKbp8lcCSnm8/vNzOh9/GECDyLnzDqSPO5S5kOkHN9IccD35fj9WaZUY8+tZQeG/WzWrutnt1xRHQlwIpaoM5lSo8z4jKiPUXeSlYae+yizf4VmQqp7WMcVhGZO+U/xPw9EvCgGMByMs/hqpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wizYFfz59PhlNoxtC/h1KSY5zhBVyzhY6d0IkefwzO0=; b=fblhrJ2IPmE4DRffkuoufgXNJBvFv2W3CazgUz6KG3SJDCWPwtft3v/pL67EUEQHxF4FM8sh8H419JRsFodUGUwqkR/VpPuFIUHWywXy4uZAxfXpMC0u2u9AmTiT0BLSc8xF6zwXbd5niUO9brxEqRejl08KD6HOLHjIVqp1dYtwfOK/Pza7tRb5HXM10YD1tqayaOlqh319Ip3fwKJPQpcmLFnz1mhRJtQBdlg3xI/7/cLCX8CyXMwWRJizKovicUPV2sOy1L+At7VM/e8WbV42BmdcHo19rPzx1ZxrdipkRD4BHtJWxZNwQH+676vkUIF/76Uqc9trHXxZKFfZKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by DM4PR11MB5488.namprd11.prod.outlook.com (2603:10b6:5:39d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26; Tue, 8 Nov 2022 01:26:05 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::666a:6f66:597a:7620]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::666a:6f66:597a:7620%9]) with mapi id 15.20.5791.026; Tue, 8 Nov 2022 01:26:05 +0000 From: "Yao, Jiewen" To: "Vang, Judah" , "devel@edk2.groups.io" CC: "Wang, Jian J" , Xiaoyu Lu , "Jiang, Guomin" , "Mistry, Nishant C" Subject: [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors Thread-Topic: [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors Thread-Index: AQHY8uPpLp/EL4rXqEGiJAbA+jGUh640PFrg Date: Tue, 8 Nov 2022 01:26:05 +0000 Message-ID: References: <20221107200225.3697-1-judah.vang@intel.com> <20221107200225.3697-2-judah.vang@intel.com> In-Reply-To: <20221107200225.3697-2-judah.vang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|DM4PR11MB5488:EE_ x-ms-office365-filtering-correlation-id: 9f346faf-62b0-477d-d6c9-08dac128348d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UKAve4UT6qFguwtHlk8dtgiW8ybeh/tbRsbgQjFJkXlf/QpJStvW3G/qWe+0sLVpYYBXZDIt165Uz7yIA+s95A0gYE0IHbzWrhslA8vmFf2PgCZEx5NiXEZvwr9fQSMI42oeHn6Twk0pgIik8D7SWlmOtY/SxH2bauqOFXLCvPZ9GHavhqeV84lxZ/k8iPIilTHfWTPQRK+34FduQ8+Mqc58gCxqDPGlbg3/ccjQJ2+RNpe6mI4XIKIYRvugcLiagO6GpcJtj5VZouAjgdvTcQ+J0Xap90K4GuD8WkRZ6HX4IJ9Yt68UfZQx7G0dVr4IbcU+HpJcA9kao7g22GYbrmRUNktV1pD2FYI7/f6o7OM5NbHpE83JvOu2AHchuwFAyrgRCn8qkRvSR2YriLv3rL68EZUQJ7QLOp6t0cgVa8TSTQAynOkzM/+FosPmYxpwiSEaFkkQImUkevHWgixrcOMvuQaegMF0UUH+c5LxXvCucVZntr0toGxMfoj0ohAhrAQes/XnY/7a0N592DObm1+ISRVsyTydddnA2dA1c2feI25jsBjxdkoqV+UvxFclRZ7mVbm37JvUU+jW94ydlIXhMIcQiYJ3kzMsQ1A+ha54c+voECqS+GdcA7JMGUC4JWbQftBtRJ8mFbHnNfADICgb2b0atRScknda2cDEYAx8jPJ43vOshPrFJkvdJ/UC9m+OunonSBppp4qk87PJVoL2+r3r28GWP9shanhELZQgLBFdX+tQjSTHWg9RWAQfz/hOllqZjS0itjyqZ0qgmaib+GneL2WIm27+BLsaP9g= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(346002)(39860400002)(376002)(366004)(136003)(451199015)(33656002)(86362001)(38070700005)(82960400001)(83380400001)(55016003)(5660300002)(2906002)(53546011)(110136005)(186003)(6506007)(107886003)(7696005)(26005)(38100700002)(122000001)(9686003)(76116006)(66946007)(54906003)(478600001)(66556008)(8676002)(64756008)(4326008)(66476007)(71200400001)(19627235002)(66446008)(52536014)(8936002)(966005)(41300700001)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9ua+HhmuaXb/MYXTgaSI1PyBSjPO0mezh6aDnaBoxJ2JoMuNEQ+AqYxUs1cM?= =?us-ascii?Q?QXfhGKFRsaDgwXStZ80gPNXNSwAjFdplYAKIXKqNTcpnTM41QgMaPd+yVWAZ?= =?us-ascii?Q?AwG8olr5+XHlb6NxF/znsvladTpICmzMntjku2colqziQf+eUwF3IpZTMahh?= =?us-ascii?Q?IlFUtkkXPG9TIQoHflY8ISn6i4viHLy6jiTnOIR75LH9ee30DL+NJMC4Myup?= =?us-ascii?Q?V/PAbIKPW4gGkmjY5sgiTe8OMN+hk8hyLGoTtd5J5k8v4in8DEoViL7QSimH?= =?us-ascii?Q?HdV/nAFbvRzIVSZ0y6rzaJv8QRnMrS7G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ZPjZFFhCUGQuC2g3tNcubZLJCgdvHVUxjrZSbc3vVFXbMn/yblMOeqwszqI?= =?us-ascii?Q?d+lMWNf4OSbpnBoACUYdlF9/2d1vDe1ROAKKD+MXeBtuhV5W2wFJqXbSIMk6?= =?us-ascii?Q?iv4c4bQN/5y+KVerihqGlMu+prCXEpSnXP1f503aVgBObcvtkil2ZARGVtev?= =?us-ascii?Q?HPZx+ycMzFxz6W4k3XPTrL7OjyxZp6HMjP3YTLXOz9vQYfYw009yaFsNUEOp?= =?us-ascii?Q?3o9Ex5E5pNHS2GrjaOKeyGqe4xT4yajyFRgKcXZ17S7lc5EhZV519ay9V2cq?= =?us-ascii?Q?Hx+4sTv5ZuhJA69HKK4c9nNvz4r6ybY/r0YeX0AZj/B9SbUposWxgxA/Z6rz?= =?us-ascii?Q?9Q6sSboCiKM0hjz8C4nDem7O31kgjBUS9ddx7jjd?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f346faf-62b0-477d-d6c9-08dac128348d X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2022 01:26:05.0441 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /PafrKh1s1Uxy6ZxjZqyEubcVBmDPFtt1jMU675B8lQ5G8Mf7eownlWeWOM1dTeT/uQoncjETw4qgCiHrGocxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5488 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello I suggest we add this to edk2-stable202211, since this is an important bug = fix. The V1 and V2 patch are sent before soft freeze. V3 patch splits V2. Thank you Yao Jiewen > -----Original Message----- > From: Vang, Judah > Sent: Tuesday, November 8, 2022 4:02 AM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J > ; Xiaoyu Lu ; Jiang, Guomin > ; Mistry, Nishant C > Subject: [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3991 >=20 > Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES > is defined. Percolate the #ifndef DiSABLE_SHA1_DEPRECATED_INTERFACES > to all the Sha1 functions. >=20 > 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(-) >=20 > 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); > -- > 2.35.1.windows.2