From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.4161.1606292858726991652 for ; Wed, 25 Nov 2020 00:27:39 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mxzVhCNY; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: jiewen.yao@intel.com) IronPort-SDR: cdQ+sGKbnBV3kMSXKNrnN8bYJQuIO+HJrGfxsPNR5E/TqYUQFCnak3BookGFmSGSla3zznujq6 hEka7bEJ4u+A== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="233699603" X-IronPort-AV: E=Sophos;i="5.78,368,1599548400"; d="scan'208";a="233699603" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2020 00:27:37 -0800 IronPort-SDR: ea5gtIwLtc/+rS0Bkf1qxIJ8CmghJ6i04B5ARVhDB6OxYtRtskiYzs1nSyRPhY0vsH98Tb6Lzy RPS7bCprLCvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,368,1599548400"; d="scan'208";a="547181113" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP; 25 Nov 2020 00:27:37 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 25 Nov 2020 00:27:36 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 25 Nov 2020 00:27:36 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 25 Nov 2020 00:27:36 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 25 Nov 2020 00:27:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UPiUwxwz/Q+ZhIVaCm15ae1VnXiu7X0YDWWCFwirTTEuFabSGpP4LVkaOUaAnIEWTAxlLSiez4hsFH/OWzZSUPVtuYu+peqdzKv6qckuPprSRTzGg3O2WVoKGKEOO4oaQoVQYntYtZJixMziPIyLDOqKxXCZOhLZoZcV0WCBJLJAobuBnIXNIwNCcaC6njTruZ+ntN3K6IIei6Ch3p7dpUo4JRN6lsaO19PkQDbzpNue4wxshMFFqivzZ/T3EB669GyKoNHRzVW43yVCERHmOQhri7Q0FsVg8GjPwQp59yW7wIPIN4hypdjUouOUSn917aI7YM4YzciATVuSqOxc8A== 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-SenderADCheck; bh=K+dEL0p0YgwYPUnfXE8zxGGxn75TIjriDeK0UiElZIA=; b=RG25xwbI5td0EWJ7E0xyM5WCSFcDO0qIsumPEyGqFFTMEMpElf49R3V1a4H/b9IfPcTsNWApHWf0drX4WsXIEF+1SuvT7K5VcJ9iSRLG007gxmlEl3/TDafoF9z+lF8ARSMEyYgNKVxfYIkJr8V+9T90TCRmUz22MhiLVaQXkNZn4pSnQbFN08YGmTZn8tIBmAytOa+4Ut9x0AIeh29rlxWvzgTzub/cOOWFNidZtBgkRJTB+af9jbT/RXGy9CkWrtb3h19c43hd7Fzau9tiyI4JL3vg+KaNvqyhnmwmMRsLRadHlzVUxyGsZJczpC9ur5K7eI26NUrgbc27Xn7gdg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K+dEL0p0YgwYPUnfXE8zxGGxn75TIjriDeK0UiElZIA=; b=mxzVhCNYdJKWe01tbJ80UdqnlXlCeZgyehkVC/eqAubHg613w6hitDuOfcQm5pXWm/Vz9x7Vfqxyhp6m1+mjmqufmOPLFyGZBZVTQYySNbhFXNB+8ddKpPOtOcYkS8MGAuuyRU/eovM1opZQjwrFc5rHER755P5FekxOF927qsE= Received: from CY4PR11MB1288.namprd11.prod.outlook.com (2603:10b6:903:23::8) by CY4PR11MB0056.namprd11.prod.outlook.com (2603:10b6:910:7c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Wed, 25 Nov 2020 08:27:34 +0000 Received: from CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::a188:2994:6c14:aad7]) by CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::a188:2994:6c14:aad7%12]) with mapi id 15.20.3589.030; Wed, 25 Nov 2020 08:27:34 +0000 From: "Yao, Jiewen" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, XiaoyuX" , "Jiang, Guomin" Subject: Re: [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests Thread-Topic: [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests Thread-Index: AQHWwukCNMvYSEYAwE2XJu1bjUa7PqnYg8NA Date: Wed, 25 Nov 2020 08:27:33 +0000 Message-ID: References: <20201125050758.1507-1-michael.d.kinney@intel.com> <20201125050758.1507-5-michael.d.kinney@intel.com> In-Reply-To: <20201125050758.1507-5-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [101.80.124.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 134a8508-abff-40e7-16d3-08d8911bf579 x-ms-traffictypediagnostic: CY4PR11MB0056: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:586; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3fcynQh5lCPM6SLMQxNzRIQsT7YEJBtmYRTTU1hAtFJKx9brrADl71umhsor/UGRc8WKz8MSpI85e5s+bwU/dw+6UZR57noinQoPA5qrR55wrhamCIQbnnms/X4sHYUzb2A475RmWpP9vPW3MBdy6o7H05RVCS6LHxnPuu7yN5rZRC658WFlIOgX7u8Rtv1bNe1ek/4DbKiDl9hQ42OoogdbghM9kxBPUVVpBFv/04JclsS3Wri79ybbb9Rir/a3QHAmSqJA1zl8Ky42Bf/WF0AmDQIPx2wK6RVFY0tnCf6L4YvQOhnHUU6ciH9NC3Uqd57vb1OF9ix9apWLTtC26g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1288.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(39860400002)(346002)(396003)(366004)(376002)(71200400001)(66446008)(2906002)(33656002)(5660300002)(66556008)(83380400001)(26005)(478600001)(64756008)(52536014)(107886003)(186003)(53546011)(6506007)(316002)(9686003)(86362001)(66476007)(66946007)(4326008)(54906003)(7696005)(76116006)(8936002)(55016002)(8676002)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: hkfVhhM1yJikyLfoCpnRIAXjhkS4attViAKS7u7WL/8rnhYBkcOZrcFXYAhiOpQ0mlsq0rzxpkP7XaYeaVrZX1RzbIezROYIeK5iq93KMLTOnyGYpHEZBe+Uhsul9uA+uWdoDlmK1ax5sfoxkEYOQm8TDjlDBLJ+JWmhR6OUWj6ErBe5XpusVh9TGdvmFmTBSgRogMcUINF/kF2Jq66RdG9+yCmprJByqGQD9OqlfNuyCLoGEam3VcRz+rx+ziuDbbHjJat3preAs0imO9rs2tMnRrPUdIxqGDnoDQZOw2kNfnP6kfs3296Q+uNuX6zxuRULhsIePUV5kh1ofEMX4k2ZIgVq5d61cl+QBiICzUS7D5r9E10wjuIADOn3i7mKUsVSE5pjRSzqiMZT035JZoO4i0oTMwr/ylXR6l3oTs/Zog9MreRPmiAojR8s+c3BpuuLiDa8MX3fSUW3V2a+3+s0qZW404lpF29nLwznX3NxlhZBln50e/zQOQnlnu0LzP3LK21sfzEecRpqPQ1oTZLt44RPjcnKW3yPfvoKQ9B09jYRC+tU/JZEe7vNRmj3kEAtKT9Sx9mnxv2mO2ZZRbW+jg8Kb1JptLk2H0kMzP9kVVM0CA3UEzPwe3yAt1wGOlYBlYsehVysdIoVgs4ypt98GWb4n8vf4boYhtdDX25crI74/pqSQYKILLCpOZEbZlSFFAWTEK8KZcFYOI3HjKzi4uCokJOuAiHvdxZvupEE6oDu5a49c/VDGmmjrPZDJmewY7zsVylPqu1PQn+IwpKzavJ3tS4Ru80/9SZZMvWI/7s1PgxgMEBWOYTs+98uOGe15Ig4ai5cPY6sBxd9Ts+F4ZL34/N+K7fsMf5LZEqh53u5AaE64vOpGRLs8lyN1nBYb8CN7v6SaLoRIEDjaQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1288.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 134a8508-abff-40e7-16d3-08d8911bf579 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2020 08:27:33.9833 (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: PHWCn0jQDeaHHTAmdg2FFIqatjE1U2M+ovqRFr5+14+decULKl5aIUH/mO6xzylQ9Ow3wkaHrQPmMn/CB5oueg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB0056 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 Reviewed-by: Jiewen Yao > -----Original Message----- > From: Michael D Kinney > Sent: Wednesday, November 25, 2020 1:08 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J > ; Lu, XiaoyuX ; Jiang, > Guomin > Subject: [Patch v2][edk2-stable202011 4/4] > CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests >=20 > Only include MD5 unit tests if ENABLE_MD5_DEPRECATED_INTERFACES > is defined. >=20 > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Guomin Jiang > Signed-off-by: Michael D Kinney > --- > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > index bc47c5736246..24919053324a 100644 > --- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > +++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > @@ -21,10 +21,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 > *HashData =3D "abc"; > // > // Result for MD5("abc"). (From "A.5 Test suite" of IETF RFC1321) > // > +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES > GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 > Md5Digest[MD5_DIGEST_SIZE] =3D { > 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d= , 0x28, > 0xe1, 0x7f, 0x72 > - > }; > +#endif >=20 > // > // Result for SHA-1("abc"). (From "A.1 SHA-1 Example" of NIST FIPS 180-2= ) > @@ -107,7 +108,9 @@ typedef struct { > VOID *HashCtx; > } HASH_TEST_CONTEXT; >=20 > +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES > HASH_TEST_CONTEXT mMd5TestCtx =3D {MD5_DIGEST_SIZE, > Md5GetContextSize, Md5Init, Md5Update, Md5Final, Md5HashAll, > Md5Digest}; > +#endif > HASH_TEST_CONTEXT mSha1TestCtx =3D {SHA1_DIGEST_SIZE, > Sha1GetContextSize, Sha1Init, Sha1Update, Sha1Final, Sha1HashAll, > Sha1Digest}; > HASH_TEST_CONTEXT mSha256TestCtx =3D {SHA256_DIGEST_SIZE, > Sha256GetContextSize, Sha256Init, Sha256Update, Sha256Final, > Sha256HashAll, Sha256Digest}; > HASH_TEST_CONTEXT mSha384TestCtx =3D {SHA384_DIGEST_SIZE, > Sha384GetContextSize, Sha384Init, Sha384Update, Sha384Final, > Sha384HashAll, Sha384Digest}; > @@ -187,7 +190,9 @@ TEST_DESC mHashTest[] =3D { > // > // -----Description----------------Class---------------------Functio= n--------------- > Pre------------------Post------------Context > // > +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES > {"TestVerifyMd5()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyHa= sh, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mMd5TestCtx}, > +#endif > {"TestVerifySha1()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyHa= sh, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha1TestCtx}, > {"TestVerifySha256()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyHa= sh, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha256TestCtx}, > {"TestVerifySha384()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyHa= sh, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha384TestCtx}, > -- > 2.29.2.windows.2