From nobody Fri Mar 29 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40603+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40603+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557844224; cv=none; d=zoho.com; s=zohoarc; b=oZ9f4ZdPwe3jwIDXWWPaWgrTZJno7nl9tFPj1Q5HypOBcI8868QYywLCeWsKU36jNq/q7dXfEJzn5QRPste/iM/yHQW9ElWSEj76C/P0VAwfmrD+htlLXvl7ITIZ6PaKCiytP/cWxr9V5bCJ3yzsVjTaJFN6qIp7QZ30AEHCQXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557844224; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=do9SuOjhLVlnyRIQBpYiHj1tfJJASdsJ+bItlAa5Z6s=; b=KoTe4B+Rg26JZq/1eg+JlDG+mcjeYkPZKu1WJDWH/sGPhWos2HlUHoG99YMfcikGct9T1vNXqNu9jvAuFNhdlizfoyiBwR07gJ155USCDAVtU3N9SA0lp7eNxDunfy8PdkxW3VI+5qFU3kOArnlR3wuoVFcmmWD/QNkP1VRgAg8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40603+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557844224231487.311847486278; Tue, 14 May 2019 07:30:24 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Tue, 14 May 2019 07:30:22 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2019 07:30:14 -0700 X-ExtLoop1: 1 X-Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.28]) by orsmga004.jf.intel.com with ESMTP; 14 May 2019 07:30:13 -0700 From: "Wang, Jian J" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Ting Ye Subject: [edk2-devel] [PATCH] CryptoPkg/BaseCryptLib: remove unused code for IPF Date: Tue, 14 May 2019 22:30:00 +0800 Message-Id: <20190514143000.486176-1-jian.j.wang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jian.j.wang@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557844223; bh=m0ij+KQqEdR/zYxcdqaxveG8AIAi4v6CW01wNulFH1E=; h=Cc:Date:From:Reply-To:Subject:To; b=fB2hlMVzyznW8CgjWqCZAQuEejJRIM9cyZVg/7gdOc5hWw3yGf6JO2QAxkWYHEZcUMT 3y0A0A99x9n07Ix1uAR8QNG5xNGCAJImRWo9+8of/nYRL2zXuE+4L4x7x8WSr22Wt9Vvj 2fo3TCKmTVOvkEJ8RA2ADxOd4Ef2BlmXcOI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1805 CryptRandItc.c is only for IPF arch, which has not been supported any more in edk2. And no module actually reference this file. This patch just removes it from tree. Cc: Liming Gao Cc: Michael D Kinney Cc: Ting Ye Signed-off-by: Jian J Wang --- .../Library/BaseCryptLib/Rand/CryptRandItc.c | 112 ------------------ 1 file changed, 112 deletions(-) delete mode 100644 CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c diff --git a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c b/CryptoPkg= /Library/BaseCryptLib/Rand/CryptRandItc.c deleted file mode 100644 index 8699cfeb71..0000000000 --- a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c +++ /dev/null @@ -1,112 +0,0 @@ -/** @file - Pseudorandom Number Generator Wrapper Implementation over OpenSSL. - -Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalCryptLib.h" -#include -#include -#include - -/** - Sets up the seed value for the pseudorandom number generator. - - This function sets up the seed value for the pseudorandom number generat= or. - If Seed is not NULL, then the seed passed in is used. - If Seed is NULL, then default seed is used. - - @param[in] Seed Pointer to seed value. - If NULL, default seed is used. - @param[in] SeedSize Size of seed value. - If Seed is NULL, this parameter is ignored. - - @retval TRUE Pseudorandom number generator has enough entropy for rand= om generation. - @retval FALSE Pseudorandom number generator does not have enough entrop= y for random generation. - -**/ -BOOLEAN -EFIAPI -RandomSeed ( - IN CONST UINT8 *Seed OPTIONAL, - IN UINTN SeedSize - ) -{ - CHAR8 DefaultSeed[128]; - - if (SeedSize > INT_MAX) { - return FALSE; - } - - // - // The software PRNG implementation built in OpenSSL depends on message = digest algorithm. - // Make sure SHA-1 digest algorithm is available here. - // - if (EVP_add_digest (EVP_sha1 ()) =3D=3D 0) { - return FALSE; - } - - // - // Seed the pseudorandom number generator with user-supplied value. - // NOTE: A cryptographic PRNG must be seeded with unpredictable data. - // - if (Seed !=3D NULL) { - RAND_seed (Seed, (UINT32) SeedSize); - } else { - // - // Retrieve current time. - // - AsciiSPrint ( - DefaultSeed, - sizeof (DefaultSeed), - "UEFI Crypto Library default seed (%ld)", - AsmReadItc () - ); - - RAND_seed (DefaultSeed, sizeof (DefaultSeed)); - } - - if (RAND_status () =3D=3D 1) { - return TRUE; - } - - return FALSE; -} - -/** - Generates a pseudorandom byte stream of the specified size. - - If Output is NULL, then return FALSE. - - @param[out] Output Pointer to buffer to receive random value. - @param[in] Size Size of random bytes to generate. - - @retval TRUE Pseudorandom byte stream generated successfully. - @retval FALSE Pseudorandom number generator fails to generate due to la= ck of entropy. - -**/ -BOOLEAN -EFIAPI -RandomBytes ( - OUT UINT8 *Output, - IN UINTN Size - ) -{ - // - // Check input parameters. - // - if (Output =3D=3D NULL || Size > INT_MAX) { - return FALSE; - } - - // - // Generate random data. - // - if (RAND_bytes (Output, (UINT32) Size) !=3D 1) { - return FALSE; - } - - return TRUE; -} --=20 2.17.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40603): https://edk2.groups.io/g/devel/message/40603 Mute This Topic: https://groups.io/mt/31618879/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-