From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 67135D8027A for ; Thu, 3 Aug 2023 04:38:58 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LSLFkj81/Y+47u/GwGtcOkwPY03pSD+lS4mCTAXPANI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691037537; v=1; b=eMcWZV55rhdAlBbtBPOV0fdssHp10ClOJhI357putaf2vF9PzWB1S6J4GunxTyQaaQOKfsie e76kKRuF+AIGhYHifueomZ1nYLim2GR6kHtE1BCLi0Gn7IRVY9S5uJtkcTOCKVE4IoJvMgOV7Nf DKS7qr9i1pbYncnNmr4bpDTY= X-Received: by 127.0.0.2 with SMTP id Rq7xYY7687511xPuUTyfa69q; Wed, 02 Aug 2023 21:38:57 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.7306.1691037531078533765 for ; Wed, 02 Aug 2023 21:38:51 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="456141183" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="456141183" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2023 21:38:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="794848035" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="794848035" X-Received: from liyi4-desktop.ccr.corp.intel.com ([10.239.153.10]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2023 21:38:38 -0700 From: "Li, Yi" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [PATCH V2 10/29] CryptoPkg/openssl: adapt rand_pool.c to openssl 3.0 changes Date: Thu, 3 Aug 2023 12:37:28 +0800 Message-Id: <66c7383ba053f19ffd6769e5ccb9b8f769b03717.1691031203.git.yi1.li@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: 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,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 29eijDCVvX1JJm4sxZE9C2IZx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eMcWZV55; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) From: Gerd Hoffmann Some functions have been renamed. Signed-off-by: Gerd Hoffmann Cc: Jiewen Yao Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/Library/OpensslLib/rand_pool.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/rand_pool.c b/CryptoPkg/Library/OpensslLib/rand_pool.c index 13e860a853..03047b233e 100644 --- a/CryptoPkg/Library/OpensslLib/rand_pool.c +++ b/CryptoPkg/Library/OpensslLib/rand_pool.c @@ -74,7 +74,7 @@ RandGetBytes ( * This is OpenSSL required interface. */ size_t -rand_pool_acquire_entropy ( +ossl_pool_acquire_entropy ( RAND_POOL *pool ) { @@ -82,21 +82,21 @@ rand_pool_acquire_entropy ( size_t Bytes_needed; unsigned char *Buffer; - Bytes_needed = rand_pool_bytes_needed (pool, 1 /*entropy_factor*/); + Bytes_needed = ossl_rand_pool_bytes_needed (pool, 1 /*entropy_factor*/); if (Bytes_needed > 0) { - Buffer = rand_pool_add_begin (pool, Bytes_needed); + Buffer = ossl_rand_pool_add_begin (pool, Bytes_needed); if (Buffer != NULL) { Ret = RandGetBytes (Bytes_needed, Buffer); if (FALSE == Ret) { - rand_pool_add_end (pool, 0, 0); + ossl_rand_pool_add_end (pool, 0, 0); } else { - rand_pool_add_end (pool, Bytes_needed, 8 * Bytes_needed); + ossl_rand_pool_add_end (pool, Bytes_needed, 8 * Bytes_needed); } } } - return rand_pool_entropy_available (pool); + return ossl_rand_pool_entropy_available (pool); } /* @@ -105,7 +105,7 @@ rand_pool_acquire_entropy ( * This is OpenSSL required interface. */ int -rand_pool_add_nonce_data ( +ossl_pool_add_nonce_data ( RAND_POOL *pool ) { @@ -113,7 +113,7 @@ rand_pool_add_nonce_data ( RandGetBytes (sizeof (data), data); - return rand_pool_add (pool, (unsigned char *)&data, sizeof (data), 0); + return ossl_rand_pool_add (pool, (unsigned char *)&data, sizeof (data), 0); } /* @@ -130,7 +130,7 @@ rand_pool_add_additional_data ( RandGetBytes (sizeof (data), data); - return rand_pool_add (pool, (unsigned char *)&data, sizeof (data), 0); + return ossl_rand_pool_add (pool, (unsigned char *)&data, sizeof (data), 0); } /* @@ -139,7 +139,7 @@ rand_pool_add_additional_data ( * This is OpenSSL required interface. */ int -rand_pool_init ( +ossl_rand_pool_init ( VOID ) { @@ -152,7 +152,7 @@ rand_pool_init ( * This is OpenSSL required interface. */ VOID -rand_pool_cleanup ( +ossl_rand_pool_cleanup ( VOID ) { @@ -164,7 +164,7 @@ rand_pool_cleanup ( * This is OpenSSL required interface. */ VOID -rand_pool_keep_random_devices_open ( +ossl_rand_pool_keep_random_devices_open ( int keep ) { -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107496): https://edk2.groups.io/g/devel/message/107496 Mute This Topic: https://groups.io/mt/100520598/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-