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.129.124]) by mx.groups.io with SMTP id smtpd.web12.13646.1638547756896078088 for ; Fri, 03 Dec 2021 08:09:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RwICAS2B; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638547756; 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=d5+oLIQPBAzzu09tL5UMcI3MG8KH8lK0gcv20QJ0UZY=; b=RwICAS2B1x5qXBx9Eb6j4pp7hGipWaDiP4huKXdrEF4+dM9lJnB1le5Rb5Tv9VrSQ5oe/G Kd0LhDRwpBEoO/HzCU7wrVlP7HDAc9zM1CCisRAuES2XvxQxEjZaT8TifEacEPU2H3WcID B4h27RCHpB97MOTzRIInasjfGk8g65M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-599-iXGS6cKlPjWRKsu93ljq_w-1; Fri, 03 Dec 2021 11:09:15 -0500 X-MC-Unique: iXGS6cKlPjWRKsu93ljq_w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD1D9100CCC2; Fri, 3 Dec 2021 16:09:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 904B010013D6; Fri, 3 Dec 2021 16:09:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 102B518003AB; Fri, 3 Dec 2021 17:07:49 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Guomin Jiang , Pawel Polawski , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Xiaoyu Lu , Gerd Hoffmann Subject: [PATCH 14/24] CryptoPkg/openssl: adapt rand_pool.c to openssl 3.0 changes Date: Fri, 3 Dec 2021 17:07:38 +0100 Message-Id: <20211203160748.866150-15-kraxel@redhat.com> In-Reply-To: <20211203160748.866150-1-kraxel@redhat.com> References: <20211203160748.866150-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Some functions have been renamed. Signed-off-by: Gerd Hoffmann --- CryptoPkg/Library/OpensslLib/rand_pool.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/rand_pool.c b/CryptoPkg/Library/OpensslLib/rand_pool.c index 6218ae0c1cd7..89713494dcb3 100644 --- a/CryptoPkg/Library/OpensslLib/rand_pool.c +++ b/CryptoPkg/Library/OpensslLib/rand_pool.c @@ -75,7 +75,7 @@ RandGetBytes ( * This is OpenSSL required interface. */ size_t -rand_pool_acquire_entropy ( +ossl_pool_acquire_entropy ( RAND_POOL *pool ) { @@ -83,22 +83,22 @@ 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); } /* @@ -107,14 +107,14 @@ rand_pool_acquire_entropy ( * This is OpenSSL required interface. */ int -rand_pool_add_nonce_data ( +ossl_pool_add_nonce_data ( RAND_POOL *pool ) { UINT8 data[16]; 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 ( UINT8 data[16]; 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 ) { -- 2.33.1