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.web08.3695.1606289469952152328 for ; Tue, 24 Nov 2020 23:31:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=riHjXmQK; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zhichao.gao@intel.com) IronPort-SDR: xAlXOdeIfOqtK9ckT7RMM19yf+1efpjIbg1RizkfeqXXkEEN6M1wNzwGVQR2Wp6LNxCA8d/w1V qvPSx2O5Tbsg== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="236218587" X-IronPort-AV: E=Sophos;i="5.78,368,1599548400"; d="scan'208";a="236218587" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2020 23:31:07 -0800 IronPort-SDR: 9xvTMXtngfc4Pa653EDD2vCVBncys8uKpRIQFofYhQNeOdfDqD4r5BuWl7OrMhLgXtNjhn8+9k IdysbprQ/RKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,368,1599548400"; d="scan'208";a="547166004" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga005.jf.intel.com with ESMTP; 24 Nov 2020 23:31:07 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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; Tue, 24 Nov 2020 23:31:07 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 24 Nov 2020 23:31:06 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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 via Frontend Transport; Tue, 24 Nov 2020 23:31:06 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) 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; Tue, 24 Nov 2020 23:31:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8S6VgZE/GegeEicKqclrU3CDbfo6P1gwU12r73VsCgzQ9PyI9Hn+ySjLFNLxgbI0dY5Vc61RNLpAFQ76PdHnwBRXAIi3hYA6Jf6cCONvUL46/gWV6fmlK0b9cBwA8nToeEelsN8dGxZx3gLiPMUNNnsFxUo2DVFxRTJhE7+RZ0DPGxDlbr2Dzj9nvDp6/QJVfe27wcwJRFRtEAiGcuFzUzIuME6z668tgZa1X+TArCqWyC16aZL3RPZhAFGKO5Jg9whroA2mRC4psb5LGBH3HM2qOz0xEmgKUjRstTEJJWNqinrWTYmxdsE+SoRVvqnrftLW6ZD6roCDjEkf3OWsw== 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=uv411nQJNle7zK9/lHMPPdfdKq7BE0wvGa+xsnh0CLw=; b=iXNjQ3qXp51uYuEngV0q3jbSzDy7Ms3e6MRObXVgQSuYckcWWaB8MV0DMbKx6uBWneILwhMUGA5/Z1FJXAvkT3ZgECbw5derGNWa8hmLexk6ZL0Gw1h1t+9frNPxavv9WtDckJiEgkEGRA+TMeX/6y6f9FiRVHNy1VMuoOQEWIwHaeQ0nJG1cOOiL7tRNcR/q5ZtnBwG4e24IKa85iKbF2/M4cRLiSDz0FxFmCWUXGaAEsj1qcuBdsIO1GLFtsue0l5eAujO7/3LypAL05J/Lzpwz3/kzhBzp8HeCaCucF1E6HQIocHvYASI1Z984XSJy3k/AMy+2IQ2K8D+83Y02Q== 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=uv411nQJNle7zK9/lHMPPdfdKq7BE0wvGa+xsnh0CLw=; b=riHjXmQKq+AEvdqfiBBoxH8fFTYwgSw7FDp0pBO6zwFaZqnjbC/Pu+3PJi+zL/0Rj8OKi9SAymVrm2+QUS/hO+AZqfRR3Ec8nnIFRqtmBhL8wZQoePfZMWnf5h6psxvN5Z/NRD/J2P6ORzkH2FwPUxu6C9CfvWcueqdJPjCFxkg= Received: from MWHPR11MB1647.namprd11.prod.outlook.com (2603:10b6:301:d::12) by MWHPR11MB0013.namprd11.prod.outlook.com (2603:10b6:301:67::21) 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 07:31:02 +0000 Received: from MWHPR11MB1647.namprd11.prod.outlook.com ([fe80::c861:b9c1:b082:7c77]) by MWHPR11MB1647.namprd11.prod.outlook.com ([fe80::c861:b9c1:b082:7c77%8]) with mapi id 15.20.3589.030; Wed, 25 Nov 2020 07:31:02 +0000 From: "Gao, Zhichao" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Yao, Jiewen" , "Wang, Jian J" , "Lu, XiaoyuX" , "Jiang, Guomin" Subject: Re: [edk2-devel] [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests Thread-Topic: [edk2-devel] [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests Thread-Index: AQHWwukEG62c0v3XQkSUl33TsOjnJanYcaww Date: Wed, 25 Nov 2020 07:31:02 +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-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [112.65.11.139] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d277edd3-3a3f-4aa6-82ed-08d891141012 x-ms-traffictypediagnostic: MWHPR11MB0013: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Udr+nunUqXobg+FAJZt8enZjpkcFtfb69u7cdDUqullx2iRFIEiqnu70ft+edi+UJp74SwCmuFvH1CmT6JePAZ/y+is0zm2mE3VcK9IC/zkRJxiEhtN1Jl8u1cWwCWg05xQ7ssc7I/WNJ7P18/7womS1o4anTzBL78m6Fu3Eu7Jv4HNKRMcbbPAbXNZDSqc/JYhJjGPUEYB40wpqeVmuk0AW2YOMrrOSVn40xGm2B/mt9KgRgFL8AnOFvay7XgDpCot8g0fL63zCyJFussTaTpMSaL09y/l2OUo1SN7pCrlNI5s4Q1KFuTD7dPFvsdQGmLlGWnxZWdMLvpbuXkYmB6IG8lpoeFkNZfUfH80nCaKz/gMomNI2ftaAwGJmcSuLyV+TuANlyfVECNmf9ER7hg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1647.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(396003)(39860400002)(366004)(376002)(71200400001)(64756008)(76116006)(7696005)(66556008)(4326008)(66476007)(5660300002)(107886003)(86362001)(55016002)(66446008)(66946007)(6636002)(478600001)(2906002)(83380400001)(316002)(8676002)(110136005)(966005)(8936002)(26005)(186003)(54906003)(52536014)(33656002)(6506007)(9686003)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: PW4ILzGxZL7Gb84p9hA7CSbXZG0wVZ+X2zX2TkyhsLZmF7YNd0N/qzwtD18/KS4Wa/r/ITtB92VeMrq5AxhrY7PGDtl4CXFyaqyVDW0TfwokPt6ZUqVN2ACaEI74+89mud9ug9vKBTt6jbh6QsRDHLUfMENxSdDk1qqpcM8wEYIVqOuhMd3fPs7qV95e2/dS3Aapz1TFnGjJj4Lj+o7hIcd3yjhTP+V8jv6KH30sJ88Y1NkB13hDtP5BTjBBhDwf/hPhLBjqB80IxIJzIRrC647MUXHKZZY841rnOLYd6GUrsAXbJVt7IesuQJVOQpNpuGdsDjPumD1XzotEKO8RqehNPewFh9oYdEJMJ87H38pb+iOlrYw5msmsYpbrflY5CLN8ul7lvBtOTQM0oY96B+7q9A6M/tS+rJP00GvnUnAb3IuldXcDYVBRcKqaMDomk2Sg4IcSs25Xc5H4rYWsGAVwU5kYy+LYvni388aKMGbml0eCnpFrsTwdPuOcGEz0YZfmuKkKjJtE2CJG4t8jkaF0EW6Lk80Weu3gIavEeMwHZo1073vkya3FTOlBV65D6Fh5YFMGMWY9pRnDSMECfITAWvplKWprjcR2r5DSrkC2NKCM4USPop500PSR9mnkFbiX8DnLZPGAMbzbLmPdt7xJ5hHns+gWRVrdi03wmEka/1NWBbVbudjmViG/dY1HovkTbjQgvQsQQzgxlrhboGKuX5eFd8y+Fb+VbXY4a9OrLG/lTBDZA3+BHfI8yBxxrAuP/lplgX5+53HtSVTWOZ8xjgIDfib1ITOwvIVZYIncYR3rVjIR39xJFtUVwAVv/nFU4kMQJniwTS81jYkH6kO3NxL/SI57DFS+V4tBmIIuqK6PUgLoMjxMffuf6tG/B96A731Kj/rzodF9/F8LXA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1647.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d277edd3-3a3f-4aa6-82ed-08d891141012 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2020 07:31:02.5588 (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: t1R4crQ0wnKLtY96lMEW/RZFF7mkcAkzpt6W/k260bRo4BKEwRzN0z0z09e0ewbR/Mi/scnWklxmsJh+4FOzeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB0013 Return-Path: zhichao.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The patch would disable the MD5 test. Do we need to enable it in the test d= sc? Anyway, Reviewed-by: Zhichao Gao Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of 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: [edk2-devel] [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 suit= e" 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, 0x7= d, 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, Sha256HashA= ll, > Sha256Digest}; > HASH_TEST_CONTEXT mSha384TestCtx =3D {SHA384_DIGEST_SIZE, > Sha384GetContextSize, Sha384Init, Sha384Update, Sha384Final, Sha384HashA= ll, > Sha384Digest}; > @@ -187,7 +190,9 @@ TEST_DESC mHashTest[] =3D { > // > // -----Description----------------Class---------------------Functi= on--------------- > Pre------------------Post------------Context > // > +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES > {"TestVerifyMd5()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyH= ash, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mMd5TestCtx}, > +#endif > {"TestVerifySha1()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyH= ash, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha1TestCtx}, > {"TestVerifySha256()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyH= ash, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha256TestCtx}, > {"TestVerifySha384()", "CryptoPkg.BaseCryptLib.Hash", TestVerifyH= ash, > TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha384TestCtx}, > -- > 2.29.2.windows.2 >=20 >=20 >=20 >=20 >=20