From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.10735.1602982484723943509 for ; Sat, 17 Oct 2020 17:54:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=pcuzOe8L; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jiewen.yao@intel.com) IronPort-SDR: Bi3MsgVh0fU/v4bTzz286pAVhe7eW6HzXl8HIVwVsW82Lr5a1HXE7f1pTfVrViG9jpMUIvJGCp PwP28pYYKxqg== X-IronPort-AV: E=McAfee;i="6000,8403,9777"; a="146713313" X-IronPort-AV: E=Sophos;i="5.77,388,1596524400"; d="scan'208";a="146713313" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2020 17:54:43 -0700 IronPort-SDR: pe/1hzVJbDtKrN0TEcA5ttVHGJbjgtWC6oVql1bf8KuNkEU569K2rxL442AOpbU0kVpRNiiFvv I+SImrfd49aA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,388,1596524400"; d="scan'208";a="331543831" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 17 Oct 2020 17:54:43 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 17 Oct 2020 17:54:42 -0700 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.1713.5; Sat, 17 Oct 2020 17:54:40 -0700 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.1713.5 via Frontend Transport; Sat, 17 Oct 2020 17:54:40 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) 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.1713.5; Sat, 17 Oct 2020 17:54:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YPZHWkyEC/u11ibGUB2fwgezlfEmkqZcV2vh+Fat1Fg+QfjvpxGzEOpW8qYdyKT7Kj0e+U2t3BdAIQWqi2AEHKrB0eK6zyxTZK+7iMDgPJKS5Mq46DsdqG3fpTUP+SbHAOgtfVx8p8bvvnuVE0DPJiyEft8Nl7n6CtJARdafG2i4ui/Ak1WPXxyYLkAjSCMOjDYGJ/6JA/MOrQpZddkFOT7u4e0fIevfrkljdydMYh99wTkiWuDWZHSTw2X+dOiHt3AyXe4Z9bSI40JOgOirahjStDPTU+qP8A4i4CfsIMdrfpNDc7yG6YxrqOasE48OdzIby7KLMMBDJp5p+otXmA== 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=PjbMwBCTD6kHrfKIfyGXIw17wXVIJtpId1kLNNeAMLQ=; b=W5YdY2Rv8WeT+zPglXne+sO33tHWpl509iRl6dyM9yfI481ShNmnYC0X4OoIHZ5cbE9QWtSjCfjaFvLb/BPAYVfvSUzTSoLvP3TIQMhti1ogYyF4fm4YedzQObOp5ctP7sopIvkXal8DWrcGq8tRAh75QeKnl8fcuocxSiBfHcLPkk9lBbwyirTVALsInxUylTx8HgNk5uP0DO95baMcRGdDiDkkJb3fAc88Q+IPzFWZQ78X//5Xp4sRj0bQ8AP6VVOB+v9jeqnAugF0IV/sLw4K7heVHbuHThrG0WoByEawDbtcq81rzfbD2e7qMqLlTgHNbJgpWS/wb1TGBbQnLw== 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=PjbMwBCTD6kHrfKIfyGXIw17wXVIJtpId1kLNNeAMLQ=; b=pcuzOe8L9eNhTO/m1qxKlNBLuV/2IWEnQxdmF1/zBWUFJe6nSwS8ME7e2rTC0hAaScyx17xn/9TMWZoX/o6rh8sRlr+ID9dmGA3fFjNzAoDoqW/lol7JzS926vTy+kjBnG1Yw6REOcJA3HQEv0Lcb9PzN79IeQhBneTmNtoGnxk= Received: from CY4PR11MB1288.namprd11.prod.outlook.com (10.169.251.8) by CY4PR1101MB2231.namprd11.prod.outlook.com (10.172.79.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.28; Sun, 18 Oct 2020 00:54:35 +0000 Received: from CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::8948:caa4:ca1a:23ac]) by CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::8948:caa4:ca1a:23ac%10]) with mapi id 15.20.3477.027; Sun, 18 Oct 2020 00:54:35 +0000 From: "Yao, Jiewen" To: "matthewfcarlson@gmail.com" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, XiaoyuX" , "Jiang, Guomin" , Sean Brogan , Bret Barkelew , "Kinney, Michael D" , Liming Gao Subject: Re: [PATCH v6 0/2] Add Unit Tests for BaseCryptLib to CryptoPkg Thread-Topic: [PATCH v6 0/2] Add Unit Tests for BaseCryptLib to CryptoPkg Thread-Index: AQHWncOvcWmsFRTYJ0iRvZqNTZmOxqmclrYQ Date: Sun, 18 Oct 2020 00:54:35 +0000 Message-ID: References: <20201008223747.151-1-matthewfcarlson@gmail.com> In-Reply-To: <20201008223747.151-1-matthewfcarlson@gmail.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: gmail.com; dkim=none (message not signed) header.d=none;gmail.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: 0b7de22d-72f4-48f3-62b8-08d873006203 x-ms-traffictypediagnostic: CY4PR1101MB2231: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:393; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HZy57Rlk5EyZG9BZzfvPQCKWf+OrrhlIPawV8YjVl7JNrEkytavUewGw/LjfS1DXlA040teSH5Ofta1mk/Di4R7OxpOYb8AX5dxGTb0graYpUFQFHieluQegUqKfLgNKa5nTGfMzY92MQje6dNSkfcGrRrzWORHVPL520+2J61Zn3R9lpVb00NjDXQ/pYF4Yhi7dqxBAwRieERlILNQMKcaESASshXeJMchTkvCJk458avWgcRAOrHqF58zQRko+H4jmDbik7HD1o+zMFT/cfWF9XXQs5f0WvmzhcDAIeZV3ssXyI4om2rHucF5idLRt9/FV7mwlrQu+GhQ3U5IXQS7vSL+Z242XyNJvldzb89fv53ZpfEAYGZ9l75T6mrTnVY0hfNKTapK7dPf3ALrwLQ== 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)(366004)(346002)(376002)(396003)(136003)(39860400002)(2906002)(33656002)(110136005)(54906003)(316002)(55016002)(5660300002)(52536014)(76116006)(64756008)(66556008)(66476007)(66446008)(66946007)(71200400001)(4326008)(26005)(186003)(53546011)(6506007)(7696005)(8936002)(478600001)(966005)(19627235002)(86362001)(8676002)(9686003)(83380400001)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: WmPV3FPNdFwG8RaTSWFtRQMStfkHTa8J2jTOYy+kovJ5eaF2Hju3m0cBXpZsCaiPqWWNEB0iDg/ZoTIGMAYRbkrLQULLD5AMjzti0CM9i4+QELQBMMkiuHrFfvKEJQRqm0EQOe+SRObvVmjUY3wBWrNISgoi0okP3uwcPJhBTd2lKkmA/wUqHFxrEg0AU3yIIozcWG4noyt+DJJaQ/QL/n1mNlkt7DY8DDQpJj216z8Y4OOjvLYpyR3ov2CdJLDETB83ZSVDOhBVjlXtLMvBQZR9OP3BAVDRnZ2wlwg1JlJPMbixvKNYVw//PhaivurpjC0xbvhQk3c76Lv/YgIliVqtfgFpkI9QVu4d1iiWtLa0pClfztPuI5eV02y1AlYGHUtYTJV5xGNNAEYDK62U20qEDQ//f1EEcyrVfG9sLaIaFJcJttl+SSg63xswrqdXlFmq0KPWERYTvIgz9/xssBOjddSnLCuj94UNWcylhAa/B2xrNyez8gAL93oDOi7MvBTH5kVuwcLW0ewEEMeE3x+L2wVmRLJiNQoDd+xzytnWPjQSzY+os/jju7iYeVUfXhSpU6mGc18CPUTdHPB/IM1vfLdVJeEV0gTD7Qk8ltaXtK+06efFYi86YKsErGnFUIwL1aZzxNfOePgBYDA9uw== 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: 0b7de22d-72f4-48f3-62b8-08d873006203 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2020 00:54:35.1219 (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: gNjK+Y5oj5yWOMvGrtVi83YTO1JFbqv+a5KzAlqqzfnwg8yX5IkXECL7yAI7L4EWwUIktSLc0yxrhPAwK8uUlQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2231 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 Pushed. https://github.com/tianocore/edk2/pull/1026 git-hash: 694bfd6ff5b9a8352b4ca8634ed4ce449f505991, 73e3cb6c7eea4f5db81c875= 74dcefe1282de4772 > -----Original Message----- > From: matthewfcarlson@gmail.com > Sent: Friday, October 9, 2020 6:38 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Lu, XiaoyuX > ; Yao, Jiewen ; Jiang, > Guomin ; Sean Brogan > ; Bret Barkelew > ; Kinney, Michael D > ; Liming Gao > Subject: [PATCH v6 0/2] Add Unit Tests for BaseCryptLib to CryptoPkg >=20 > From: Matthew Carlson >=20 > This turns adds Host Based Unit Tests for CryptoPkg, adds a new > BaseCryptLib > implementation that is meant for unit testing and turns on HBUT for > CryptoPkg > CI. >=20 > Changes for V6: > Told ECC to ignore unit test and new CRT wrapper >=20 > Changes for V5: > Remove BaseTimerLibPosix as it is no longer needed > Cleaned up a bit of the documentation around the tests >=20 > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Jiewen Yao > Cc: Guomin Jiang > Cc: Sean Brogan > Cc: Bret Barkelew > Cc: Michael D Kinney > Cc: Liming Gao >=20 > *** BLURB HERE *** >=20 > Matthew Carlson (2): > CryptoPkg: BaseCryptLib: Add unit tests (Host and Shell based) > AzurePipelines : Pr Gate: Turn on HBUT for CryptoPkg >=20 > CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c > | 93 ++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/AuthenticodeTests.c > | 1002 ++++++++++++++++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTests.c > | 66 ++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BlockCipherTests.c > | 293 ++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c > | 106 +++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > | 197 ++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c > | 184 ++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/OaepEncryptTests.c > | 308 ++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs5Pbkdf2Tests.c > | 71 ++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTests.c > | 524 ++++++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RandTests.c > | 51 + > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaPkcs7Tests.c > | 415 ++++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaTests.c > | 310 ++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TSTests.c > | 335 +++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/UnitTestMain.c > | 81 ++ > .azurepipelines/templates/pr-gate-build-job.yml > | 2 +- > CryptoPkg/CryptoPkg.ci.yaml = | 8 + > CryptoPkg/CryptoPkg.dsc = | 23 + > CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf > | 90 ++ > CryptoPkg/Test/CryptoPkgHostUnitTest.dsc > | 35 + > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTestSignatures.h > | 789 +++++++++++++++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h > | 121 +++ > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf > | 46 + > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibShell.inf > | 49 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/ChainCreationI > nstructions.txt | 92 ++ >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/CreateTestCert > s.cmd | 11 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/SignFirmwareW > ithEKUs.cmd | 76 ++ >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > IssuingCA.ini | 45 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSigner.ini | 25 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSignerPid1.ini | 24 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSignerPid12345.ini | 27 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > NoEKUsInSigner.ini | 16 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > PolicyCA.ini | 28 + >=20 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > Root.ini | 28 + > 34 files changed, 5570 insertions(+), 1 deletion(-) > create mode 100644 > CryptoPkg/Library/BaseCryptLib/SysCall/UnitTestHostCrtWrapper.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/AuthenticodeTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BlockCipherTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/OaepEncryptTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs5Pbkdf2Tests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RandTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaPkcs7Tests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TSTests.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/UnitTestMain.c > create mode 100644 > CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf > create mode 100644 CryptoPkg/Test/CryptoPkgHostUnitTest.dsc > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/Pkcs7EkuTestSignatures.h > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibShell.inf > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/ChainCreationI > nstructions.txt > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/CreateTestCert > s.cmd > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/SignFirmwareW > ithEKUs.cmd > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > IssuingCA.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSigner.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSignerPid1.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > LeafSignerPid12345.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > NoEKUsInSigner.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > PolicyCA.ini > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestEKUCerts/TestEKUParsing > Root.ini >=20 > -- > 2.28.0.vfs.0.0