public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg
@ 2017-12-22  7:10 Long Qin
  2017-12-25  1:19 ` Zhang, Chao B
  0 siblings, 1 reply; 2+ messages in thread
From: Long Qin @ 2017-12-22  7:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: chao.b.zhang

BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=820
Remove the RngTest application from SecurityPkg, which was only for
unit test.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Long Qin <qin.long@intel.com>
---
 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/Application/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.<BR>
-This program and the accompanying materials 
-are licensed and made available under the terms and conditions of the BSD License 
-which accompanies 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 IMPLIED.
-
-**/        
-
-#include <Uefi.h>
-#include <Library/UefiLib.h>
-#include <Library/UefiApplicationEntryPoint.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/DebugLib.h>
-#include <Protocol/Rng.h>
-
-/**
-  The user Entry Point for Application. The user code starts with this function
-  as the real entry point for the application.
-
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  
-  @param[in] SystemTable    A pointer to the EFI System Table.
-  
-  @retval EFI_SUCCESS       The entry point is executed successfully.
-  @retval other             Some error occurs when executing this entry point.
-
-**/
-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    = EFI_SUCCESS;
-  PtrRngAlg = NULL;
-  Rand      = NULL;
-    
-  Print (L"UEFI RNG Protocol Testing :\n");
-  Print (L"----------------------------\n");
-
-  //-----------------------------------------
-  // Basic UEFI RNG Protocol Test
-  //-----------------------------------------
-  Print (L" -- Locate UEFI RNG Protocol : ");
-  Status = gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&Rng);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]\n", Status);
-    goto Exit;
-  } else {
-    Print (L"[Pass]\n");
-  }
-
-  //-----------------------------------------
-  // Rng->GetInfo() interface test.
-  //-----------------------------------------
-  
-  Print (L" -- Call RNG->GetInfo() interface : ");
-  RngAlgListSize = 0;
-  Status = Rng->GetInfo (Rng, &RngAlgListSize, NULL);
-  if (Status != EFI_BUFFER_TOO_SMALL) {
-    Print (L"[Fail - Status = %r]\n", Status);
-  }
-  //
-  // Print out the supported RNG algorithm GUIDs
-  //
-  RngAlgCount = RngAlgListSize / sizeof (EFI_RNG_ALGORITHM);
-  Print (L"\n     >> Supported RNG Algorithm (Count = %d) : ", RngAlgCount);
-  Status = Rng->GetInfo (Rng, &RngAlgListSize, RngAlgList);
-  for (Index = 0; Index < RngAlgCount; Index++) {
-    PtrRngAlg = (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], PtrRngAlg->Data4[1],
-             PtrRngAlg->Data4[2], PtrRngAlg->Data4[3], PtrRngAlg->Data4[4],
-             PtrRngAlg->Data4[5], PtrRngAlg->Data4[6], PtrRngAlg->Data4[7]);    
-  }
-
-  //-----------------------------------------
-  // Rng->GetRNG() interface test.
-  //-----------------------------------------
-  Print (L"\n -- Call RNG->GetRNG() interface : ");
-
-  //
-  // Allocate one buffer to store random data.
-  //
-  RandSize = 32;
-  Rand     = AllocatePool (RandSize);
-  if (Rand == NULL) {
-    goto Exit;
-  }
-  
-  //
-  // RNG with default algorithm
-  //
-  Print (L"\n     >> RNG with default algorithm : ");
-  Status = Rng->GetRNG (Rng, NULL, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-  
-  //
-  // RNG with SP800-90-HMAC-256
-  //
-  Print (L"\n     >> RNG with SP800-90-HMAC-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hmac256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with SP800-90-HASH-256
-  //
-  Print (L"\n     >> RNG with SP800-90-Hash-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hash256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with SP800-90-CTR-256
-  //
-  Print (L"\n     >> RNG with SP800-90-CTR-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Ctr256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with X9.31-3DES
-  //
-  Print (L"\n     >> RNG with X9.31-3DES : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmX9313DesGuid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with X9.31-AES
-  //
-  Print (L"\n     >> RNG with X9.31-AES : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmX931AesGuid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with RAW Entropy
-  //
-  Print (L"\n     >> RNG with RAW Entropy : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //-----------------------------------------
-  // Random Number Generator test.
-  //-----------------------------------------
-  Print (L"\n -- Random Number Generation Test with default RNG Algorithm (20 Rounds): ");
-
-  RandSize = 1;
-  for (Index = 0; Index < 20; Index++) {
-    Status = Rng->GetRNG (Rng, NULL, RandSize, Rand);
-    if (EFI_ERROR (Status)) {
-      Print (L"[Fail - Status = %r]", Status);
-      break;
-    } else {
-      Print (L"\n          %02d) - ", Index + 1);
-      for (Index2 = 0; Index2 < RandSize; Index2++) {
-        Print (L"%02x", Rand[Index2]);
-      }
-    }
-
-    RandSize +=1;
-  }
-
-  //-----------------------------------------
-  // Random Number Generator test.
-  //-----------------------------------------
-  Print (L"\n -- RAW Entropy Generation Test (20 Rounds) : ");
-
-  RandSize = 32;
-  for (Index = 0; Index < 20; Index++) {
-    Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand);
-    if (EFI_ERROR (Status)) {
-      Print (L"[Fail - Status = %r]", Status);
-      break;
-    } else {
-      Print (L"\n          %02d) - ", Index + 1);
-      for (Index2 = 0; Index2 < RandSize; Index2++) {
-        Print (L"%02x", Rand[Index2]);
-      }
-    }
-  }
-
-  Print (L"\n -- Exit UEFI RNG Protocol Test (Status = %r).\n", Status);
-  
-Exit:
-  if (Rand != NULL) {
-    FreePool (Rand);
-  }
-  return Status;
-}
diff --git a/SecurityPkg/Application/RngTest/RngTest.inf b/SecurityPkg/Application/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. 
-#  And then it will do a generation test on the supported RNG algorithm.  
-#
-#  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
-#  This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies 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 IMPLIED.
-#
-##
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = RngTest
-  FILE_GUID                      = B8AC7FB2-4211-4c2b-B62F-504421666C87
-  MODULE_TYPE                    = UEFI_APPLICATION
-  VERSION_STRING                 = 1.0
-  ENTRY_POINT                    = UefiMain
-  MODULE_UNI_FILE                = RngTest.uni
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-#  VALID_ARCHITECTURES           = 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/Application/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.<BR>
-//
-// This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies 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 IMPLIED.
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT             #language en-US "A shell application 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.<BR>
-//
-// This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies 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 IMPLIED.
-//
-// **/
-
-#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
index bb7147ec75..9ce2953034 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -159,11 +159,6 @@
   #SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf
   #SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
 
-  #
-  # Application
-  #
-  SecurityPkg/Application/RngTest/RngTest.inf
-
   #
   # TPM
   #
-- 
2.15.1.windows.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg
  2017-12-22  7:10 [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg Long Qin
@ 2017-12-25  1:19 ` Zhang, Chao B
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Chao B @ 2017-12-25  1:19 UTC (permalink / raw)
  To: Long, Qin, edk2-devel@lists.01.org

Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>

-----Original Message-----
From: Long, Qin 
Sent: Friday, December 22, 2017 3:10 PM
To: edk2-devel@lists.01.org
Cc: Zhang, Chao B <chao.b.zhang@intel.com>
Subject: [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg

BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=820
Remove the RngTest application from SecurityPkg, which was only for unit test.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Long Qin <qin.long@intel.com>
---
 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/Application/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.<BR> -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies 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 IMPLIED.
-
-**/        
-
-#include <Uefi.h>
-#include <Library/UefiLib.h>
-#include <Library/UefiApplicationEntryPoint.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/MemoryAllocationLib.h> -#include <Library/DebugLib.h> -#include <Protocol/Rng.h>
-
-/**
-  The user Entry Point for Application. The user code starts with this function
-  as the real entry point for the application.
-
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  
-  @param[in] SystemTable    A pointer to the EFI System Table.
-  
-  @retval EFI_SUCCESS       The entry point is executed successfully.
-  @retval other             Some error occurs when executing this entry point.
-
-**/
-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    = EFI_SUCCESS;
-  PtrRngAlg = NULL;
-  Rand      = NULL;
-    
-  Print (L"UEFI RNG Protocol Testing :\n");
-  Print (L"----------------------------\n");
-
-  //-----------------------------------------
-  // Basic UEFI RNG Protocol Test
-  //-----------------------------------------
-  Print (L" -- Locate UEFI RNG Protocol : ");
-  Status = gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&Rng);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]\n", Status);
-    goto Exit;
-  } else {
-    Print (L"[Pass]\n");
-  }
-
-  //-----------------------------------------
-  // Rng->GetInfo() interface test.
-  //-----------------------------------------
-
-  Print (L" -- Call RNG->GetInfo() interface : ");
-  RngAlgListSize = 0;
-  Status = Rng->GetInfo (Rng, &RngAlgListSize, NULL);
-  if (Status != EFI_BUFFER_TOO_SMALL) {
-    Print (L"[Fail - Status = %r]\n", Status);
-  }
-  //
-  // Print out the supported RNG algorithm GUIDs
-  //
-  RngAlgCount = RngAlgListSize / sizeof (EFI_RNG_ALGORITHM);
-  Print (L"\n     >> Supported RNG Algorithm (Count = %d) : ", RngAlgCount);
-  Status = Rng->GetInfo (Rng, &RngAlgListSize, RngAlgList);
-  for (Index = 0; Index < RngAlgCount; Index++) {
-    PtrRngAlg = (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], PtrRngAlg->Data4[1],
-             PtrRngAlg->Data4[2], PtrRngAlg->Data4[3], PtrRngAlg->Data4[4],
-             PtrRngAlg->Data4[5], PtrRngAlg->Data4[6], PtrRngAlg->Data4[7]);    
-  }
-
-  //-----------------------------------------
-  // Rng->GetRNG() interface test.
-  //-----------------------------------------
-  Print (L"\n -- Call RNG->GetRNG() interface : ");
-
-  //
-  // Allocate one buffer to store random data.
-  //
-  RandSize = 32;
-  Rand     = AllocatePool (RandSize);
-  if (Rand == NULL) {
-    goto Exit;
-  }
-
-  //
-  // RNG with default algorithm
-  //
-  Print (L"\n     >> RNG with default algorithm : ");
-  Status = Rng->GetRNG (Rng, NULL, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with SP800-90-HMAC-256
-  //
-  Print (L"\n     >> RNG with SP800-90-HMAC-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hmac256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with SP800-90-HASH-256
-  //
-  Print (L"\n     >> RNG with SP800-90-Hash-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Hash256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with SP800-90-CTR-256
-  //
-  Print (L"\n     >> RNG with SP800-90-CTR-256 : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmSp80090Ctr256Guid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with X9.31-3DES
-  //
-  Print (L"\n     >> RNG with X9.31-3DES : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmX9313DesGuid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with X9.31-AES
-  //
-  Print (L"\n     >> RNG with X9.31-AES : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmX931AesGuid, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //
-  // RNG with RAW Entropy
-  //
-  Print (L"\n     >> RNG with RAW Entropy : ");
-  Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand);
-  if (EFI_ERROR (Status)) {
-    Print (L"[Fail - Status = %r]", Status);
-  } else {
-    Print (L"[Pass]");
-  }
-
-  //-----------------------------------------
-  // Random Number Generator test.
-  //-----------------------------------------
-  Print (L"\n -- Random Number Generation Test with default RNG Algorithm (20 Rounds): ");
-
-  RandSize = 1;
-  for (Index = 0; Index < 20; Index++) {
-    Status = Rng->GetRNG (Rng, NULL, RandSize, Rand);
-    if (EFI_ERROR (Status)) {
-      Print (L"[Fail - Status = %r]", Status);
-      break;
-    } else {
-      Print (L"\n          %02d) - ", Index + 1);
-      for (Index2 = 0; Index2 < RandSize; Index2++) {
-        Print (L"%02x", Rand[Index2]);
-      }
-    }
-
-    RandSize +=1;
-  }
-
-  //-----------------------------------------
-  // Random Number Generator test.
-  //-----------------------------------------
-  Print (L"\n -- RAW Entropy Generation Test (20 Rounds) : ");
-
-  RandSize = 32;
-  for (Index = 0; Index < 20; Index++) {
-    Status = Rng->GetRNG (Rng, &gEfiRngAlgorithmRaw, RandSize, Rand);
-    if (EFI_ERROR (Status)) {
-      Print (L"[Fail - Status = %r]", Status);
-      break;
-    } else {
-      Print (L"\n          %02d) - ", Index + 1);
-      for (Index2 = 0; Index2 < RandSize; Index2++) {
-        Print (L"%02x", Rand[Index2]);
-      }
-    }
-  }
-
-  Print (L"\n -- Exit UEFI RNG Protocol Test (Status = %r).\n", Status);
-
-Exit:
-  if (Rand != NULL) {
-    FreePool (Rand);
-  }
-  return Status;
-}
diff --git a/SecurityPkg/Application/RngTest/RngTest.inf b/SecurityPkg/Application/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. 
-#  And then it will do a generation test on the supported RNG algorithm.  
-#
-#  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> -#  This program and the accompanying materials -#  are licensed and made available under the terms and conditions of the BSD License -#  which accompanies 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 IMPLIED.
-#
-##
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = RngTest
-  FILE_GUID                      = B8AC7FB2-4211-4c2b-B62F-504421666C87
-  MODULE_TYPE                    = UEFI_APPLICATION
-  VERSION_STRING                 = 1.0
-  ENTRY_POINT                    = UefiMain
-  MODULE_UNI_FILE                = RngTest.uni
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-#  VALID_ARCHITECTURES           = 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/Application/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.<BR> -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies 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 IMPLIED.
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT             #language en-US "A shell application 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.<BR> -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies 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 IMPLIED.
-//
-// **/
-
-#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 index bb7147ec75..9ce2953034 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -159,11 +159,6 @@
   #SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf
   #SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
 
-  #
-  # Application
-  #
-  SecurityPkg/Application/RngTest/RngTest.inf
-
   #
   # TPM
   #
--
2.15.1.windows.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-25  1:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-22  7:10 [PATCH] SecurityPkg: Remove RngTest Application from SecurityPkg Long Qin
2017-12-25  1:19 ` Zhang, Chao B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox