From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4785621CB87A0 for ; Sun, 24 Dec 2017 17:14:25 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2017 17:19:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,452,1508828400"; d="scan'208";a="4874507" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 24 Dec 2017 17:19:17 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Dec 2017 17:19:17 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Dec 2017 17:19:16 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Mon, 25 Dec 2017 09:19:14 +0800 From: "Zhang, Chao B" To: "Long, Qin" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg Thread-Index: AQHTevP4taaVbKHRI0iKJi03pITlXaNTRsOw Date: Mon, 25 Dec 2017 01:19:14 +0000 Message-ID: References: <20171222071003.8364-1-qin.long@intel.com> In-Reply-To: <20171222071003.8364-1-qin.long@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTI5YjFkMGItNGQ1Mi00ZGY2LTkyNmMtMjk5NTAyYTBlNGJhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJZUzViNzJxNTE1aEhZUmxnXC9MTDRaRkhTRFVhVlppa1ROV3ZScGtCYWkwUHZpOFJqY0dHV3VicTNjQm50SU5EMSJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 01:14:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chao Zhang -----Original Message----- From: Long, Qin=20 Sent: Friday, December 22, 2017 3:10 PM To: edk2-devel@lists.01.org Cc: Zhang, Chao B Subject: [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=3D820 Remove the RngTest application from SecurityPkg, which was only for unit te= st. Cc: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Long Qin --- SecurityPkg/Application/RngTest/RngTest.c | 234 -------------------= ---- SecurityPkg/Application/RngTest/RngTest.inf | 57 ------ SecurityPkg/Application/RngTest/RngTest.uni | 23 --- SecurityPkg/Application/RngTest/RngTestExtra.uni | 18 -- SecurityPkg/SecurityPkg.dsc | 5 - 5 files changed, 337 deletions(-) delete mode 100644 SecurityPkg/Application/RngTest/RngTest.c delete mode 100644 SecurityPkg/Application/RngTest/RngTest.inf delete mode 100644 SecurityPkg/Application/RngTest/RngTest.uni delete mode 100644 SecurityPkg/Application/RngTest/RngTestExtra.uni diff --git a/SecurityPkg/Application/RngTest/RngTest.c b/SecurityPkg/Applic= ation/RngTest/RngTest.c deleted file mode 100644 index f501f806e9..0000000000 --- a/SecurityPkg/Application/RngTest/RngTest.c +++ /dev/null @@ -1,234 +0,0 @@ -/** @file - UEFI RNG (Random Number Generator) Protocol test application. - -Copyright (c) 2013, Intel Corporation. All rights reserved.
-This prog= ram and the accompanying materials -are licensed and made available under t= he terms and conditions of the BSD License -which accompanies this distribu= tion. The full text of the license may be found at -http://opensource.org/= licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WIT= HOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ =20 - -#include -#include -#include -#include -#include -#include -#= include - -/** - The user Entry Point for Application. The user code starts with this fun= ction - as the real entry point for the application. - - @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. =20 - @param[in] SystemTable A pointer to the EFI System Table. - =20 - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs when executing this entry po= int. - -**/ -EFI_STATUS -EFIAPI -UefiMain ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - EFI_RNG_PROTOCOL *Rng; - UINTN RngAlgListSize; - EFI_RNG_ALGORITHM RngAlgList[10]; - EFI_RNG_ALGORITHM *PtrRngAlg; - UINTN RngAlgCount; - UINT8 *Rand; - UINTN RandSize; - UINTN Index; - UINTN Index2; - - Status =3D EFI_SUCCESS; - PtrRngAlg =3D NULL; - Rand =3D NULL; - =20 - Print (L"UEFI RNG Protocol Testing :\n"); - Print (L"----------------------------\n"); - - //----------------------------------------- - // Basic UEFI RNG Protocol Test - //----------------------------------------- - Print (L" -- Locate UEFI RNG Protocol : "); - Status =3D gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&Rn= g); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]\n", Status); - goto Exit; - } else { - Print (L"[Pass]\n"); - } - - //----------------------------------------- - // Rng->GetInfo() interface test. - //----------------------------------------- - - Print (L" -- Call RNG->GetInfo() interface : "); - RngAlgListSize =3D 0; - Status =3D Rng->GetInfo (Rng, &RngAlgListSize, NULL); - if (Status !=3D EFI_BUFFER_TOO_SMALL) { - Print (L"[Fail - Status =3D %r]\n", Status); - } - // - // Print out the supported RNG algorithm GUIDs - // - RngAlgCount =3D RngAlgListSize / sizeof (EFI_RNG_ALGORITHM); - Print (L"\n >> Supported RNG Algorithm (Count =3D %d) : ", RngAlgCou= nt); - Status =3D Rng->GetInfo (Rng, &RngAlgListSize, RngAlgList); - for (Index =3D 0; Index < RngAlgCount; Index++) { - PtrRngAlg =3D (EFI_RNG_ALGORITHM *)(&RngAlgList[Index]); - Print (L"\n %d) ", Index); - Print (L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", PtrRngAlg-= >Data1, - PtrRngAlg->Data2, PtrRngAlg->Data3, PtrRngAlg->Data4[0], PtrR= ngAlg->Data4[1], - PtrRngAlg->Data4[2], PtrRngAlg->Data4[3], PtrRngAlg->Data4[4]= , - PtrRngAlg->Data4[5], PtrRngAlg->Data4[6], PtrRngAlg->Data4[7]= ); =20 - } - - //----------------------------------------- - // Rng->GetRNG() interface test. - //----------------------------------------- - Print (L"\n -- Call RNG->GetRNG() interface : "); - - // - // Allocate one buffer to store random data. - // - RandSize =3D 32; - Rand =3D AllocatePool (RandSize); - if (Rand =3D=3D NULL) { - goto Exit; - } - - // - // RNG with default algorithm - // - Print (L"\n >> RNG with default algorithm : "); - Status =3D Rng->GetRNG (Rng, NULL, RandSize, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with SP800-90-HMAC-256 - // - Print (L"\n >> RNG with SP800-90-HMAC-256 : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hmac256Guid, RandSi= ze, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with SP800-90-HASH-256 - // - Print (L"\n >> RNG with SP800-90-Hash-256 : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hash256Guid, RandSi= ze, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with SP800-90-CTR-256 - // - Print (L"\n >> RNG with SP800-90-CTR-256 : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Ctr256Guid, RandSiz= e, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with X9.31-3DES - // - Print (L"\n >> RNG with X9.31-3DES : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmX9313DesGuid, RandSize, Ra= nd); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with X9.31-AES - // - Print (L"\n >> RNG with X9.31-AES : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmX931AesGuid, RandSize, Ran= d); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - // - // RNG with RAW Entropy - // - Print (L"\n >> RNG with RAW Entropy : "); - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - } else { - Print (L"[Pass]"); - } - - //----------------------------------------- - // Random Number Generator test. - //----------------------------------------- - Print (L"\n -- Random Number Generation Test with default RNG Algorithm = (20 Rounds): "); - - RandSize =3D 1; - for (Index =3D 0; Index < 20; Index++) { - Status =3D Rng->GetRNG (Rng, NULL, RandSize, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - break; - } else { - Print (L"\n %02d) - ", Index + 1); - for (Index2 =3D 0; Index2 < RandSize; Index2++) { - Print (L"%02x", Rand[Index2]); - } - } - - RandSize +=3D1; - } - - //----------------------------------------- - // Random Number Generator test. - //----------------------------------------- - Print (L"\n -- RAW Entropy Generation Test (20 Rounds) : "); - - RandSize =3D 32; - for (Index =3D 0; Index < 20; Index++) { - Status =3D Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand); - if (EFI_ERROR (Status)) { - Print (L"[Fail - Status =3D %r]", Status); - break; - } else { - Print (L"\n %02d) - ", Index + 1); - for (Index2 =3D 0; Index2 < RandSize; Index2++) { - Print (L"%02x", Rand[Index2]); - } - } - } - - Print (L"\n -- Exit UEFI RNG Protocol Test (Status =3D %r).\n", Status); - -Exit: - if (Rand !=3D NULL) { - FreePool (Rand); - } - return Status; -} diff --git a/SecurityPkg/Application/RngTest/RngTest.inf b/SecurityPkg/Appl= ication/RngTest/RngTest.inf deleted file mode 100644 index 55510f709a..0000000000 --- a/SecurityPkg/Application/RngTest/RngTest.inf +++ /dev/null @@ -1,57 +0,0 @@ -## @file -# UEFI RNG (Random Number Generator) Protocol test application. -# -# This application can print out the supported RNG algorithm in UEFI RNG = Protocol.=20 -# And then it will do a generation test on the supported RNG algorithm. = =20 -# -# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
= -# This program and the accompanying materials -# are licensed and made a= vailable under the terms and conditions of the BSD License -# which accomp= anies this distribution. The full text of the license may be found at -# h= ttp://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -= # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D RngTest - FILE_GUID =3D B8AC7FB2-4211-4c2b-B62F-504421666C87 - MODULE_TYPE =3D UEFI_APPLICATION - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D UefiMain - MODULE_UNI_FILE =3D RngTest.uni - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 -# - -[Sources] - RngTest.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - SecurityPkg/SecurityPkg.dec - -[LibraryClasses] - UefiApplicationEntryPoint - UefiLib - -[Protocols] - gEfiRngProtocolGuid ## CONSUMES - -[Guids] - gEfiRngAlgorithmSp80090Hash256Guid ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - gEfiRngAlgorithmSp80090Hmac256Guid ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - gEfiRngAlgorithmSp80090Ctr256Guid ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - gEfiRngAlgorithmX9313DesGuid ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - gEfiRngAlgorithmX931AesGuid ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - gEfiRngAlgorithmRaw ## SOMETIMES_CONSUMES ## GUID = # Unique ID of the algorithm for RNG - - [UserExtensions.TianoCore."ExtraFiles"] - RngTestExtra.uni \ No newline at end of file diff --git a/SecurityPkg/Application/RngTest/RngTest.uni b/SecurityPkg/Appl= ication/RngTest/RngTest.uni deleted file mode 100644 index 2cf82f9a37..0000000000 --- a/SecurityPkg/Application/RngTest/RngTest.uni +++ /dev/null @@ -1,23 +0,0 @@ -// /** @file -// UEFI RNG (Random Number Generator) Protocol test application. -// -// This application can print out the supported RNG algorithm in UEFI RNG = Protocol. -// And then it will do a generation test on the supported RNG algorithm. -// -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
= -// -// This program and the accompanying materials -// are licensed and ma= de available under the terms and conditions of the BSD License -// which ac= companies this distribution. The full text of the license may be found at -= // http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -= // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "A shell applicati= on that used UEFI RNG (Random Number Generator) Protocol test" - -#string STR_MODULE_DESCRIPTION #language en-US "This application = can print out the supported RNG algorithm in UEFI RNG Protocol. And then it= will do a generation test on the supported RNG algorithm." - diff --git a/SecurityPkg/Application/RngTest/RngTestExtra.uni b/SecurityPkg= /Application/RngTest/RngTestExtra.uni deleted file mode 100644 index 9f2a92d1c9..0000000000 --- a/SecurityPkg/Application/RngTest/RngTestExtra.uni +++ /dev/null @@ -1,18 +0,0 @@ -// /** @file -// RngTest Localized Strings and Content -// -// Copyright (c) 2014, Intel= Corporation. All rights reserved.
-// -// This program and the accompa= nying materials -// are licensed and made available under the terms and con= ditions of the BSD License -// which accompanies this distribution. The ful= l text of the license may be found at -// http://opensource.org/licenses/bs= d-license.php -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -= // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. -// -// **/ - -#string STR_PROPERTIES_MODULE_NAME -#language en-US -"UEFI RNG (Random Number Generator) Protocol Test Application" - diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc inde= x bb7147ec75..9ce2953034 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -159,11 +159,6 @@ #SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManag= erDxe.inf #SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager= Dxe.inf =20 - # - # Application - # - SecurityPkg/Application/RngTest/RngTest.inf - # # TPM # -- 2.15.1.windows.2