summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-08-03 12:37:28 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-08-09 07:10:31 +0000
commitc638d1f67293d3c80b9e1e56710219b276490939 (patch)
tree309f50d77506a9575fe9981e9f4a4937f5a8e463 /CryptoPkg
parenteac38f74c4b05b5b42c5bdf2769838549026dafd (diff)
downloadedk2-c638d1f67293d3c80b9e1e56710219b276490939.tar.gz
edk2-c638d1f67293d3c80b9e1e56710219b276490939.tar.bz2
edk2-c638d1f67293d3c80b9e1e56710219b276490939.zip
CryptoPkg/openssl: adapt rand_pool.c to openssl 3.0 changes
Some functions have been renamed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Library/OpensslLib/rand_pool.c24
1 files 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
)
{