From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.14705.1678696234628258086 for ; Mon, 13 Mar 2023 01:30:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MEEbp3EK; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678696233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aHOk4N6vg5EG5gTYA9vhVqCmwIbn6N/OCJVSesiYrnY=; b=MEEbp3EKeG7MmXTKkBfa0VCddwhfzNDhE4QgMgiaFj2GUGluJjGZ6jA8ErBBzI0KewLPH5 RUdHnrbqJRXRDv0Jo5JeUXyVuEecS7Z7imRtDegLjf9zhuFxLdQUclEaTJuKvz0JblFTKp CaxTNNCrkDNB5PBEIYdwJZOjGzp9Th8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-534-zwTr9TcYPUayGAD4zyyZvw-1; Mon, 13 Mar 2023 04:30:30 -0400 X-MC-Unique: zwTr9TcYPUayGAD4zyyZvw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D37582A59552; Mon, 13 Mar 2023 08:30:29 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7FE7C1121315; Mon, 13 Mar 2023 08:30:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6720A1801E8C; Mon, 13 Mar 2023 09:30:16 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jian J Wang , Pawel Polawski , Xiaoyu Lu , Ard Biesheuvel , Guomin Jiang , Gerd Hoffmann , Jiewen Yao , Oliver Steffen , Jordan Justen Subject: [PATCH 12/22] CryptoPkg/openssl: adapt rand_pool.c to openssl 3.0 changes Date: Mon, 13 Mar 2023 09:30:06 +0100 Message-Id: <20230313083016.136448-13-kraxel@redhat.com> In-Reply-To: <20230313083016.136448-1-kraxel@redhat.com> References: <20230313083016.136448-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Some functions have been renamed. Signed-off-by: Gerd Hoffmann --- 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 13e860a853d0..03047b233e3e 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.39.2