diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-03-08 19:17:53 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-18 17:52:37 +1000 |
commit | 1335ca4b0799d1714a2f8e21525cb23edf660e93 (patch) | |
tree | 721491aee8abff6f8e10761bc8a1f3edaf0a3eb7 /crypto/rand/rand_lib.c | |
parent | 9500c8234d8e99396717b9e43f10cc518e8bf668 (diff) |
Add ossl_rand symbols
Partial fix for #12964
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'crypto/rand/rand_lib.c')
-rw-r--r-- | crypto/rand/rand_lib.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 3cd34198c1..318540cff0 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -57,7 +57,7 @@ DEFINE_RUN_ONCE_STATIC(do_rand_init) goto err; # endif - if (!rand_pool_init()) + if (!ossl_rand_pool_init()) goto err; rand_inited = 1; @@ -75,7 +75,7 @@ DEFINE_RUN_ONCE_STATIC(do_rand_init) return 0; } -void rand_cleanup_int(void) +void ossl_rand_cleanup_int(void) { # ifndef OPENSSL_NO_DEPRECATED_3_0 const RAND_METHOD *meth = default_RAND_meth; @@ -87,7 +87,7 @@ void rand_cleanup_int(void) meth->cleanup(); RAND_set_rand_method(NULL); # endif - rand_pool_cleanup(); + ossl_rand_pool_cleanup(); # ifndef OPENSSL_NO_ENGINE CRYPTO_THREAD_lock_free(rand_engine_lock); rand_engine_lock = NULL; @@ -107,7 +107,7 @@ void rand_cleanup_int(void) void RAND_keep_random_devices_open(int keep) { if (RUN_ONCE(&rand_init, do_rand_init)) - rand_pool_keep_random_devices_open(keep); + ossl_rand_pool_keep_random_devices_open(keep); } /* @@ -128,9 +128,9 @@ int RAND_poll(void) if (!ret) { /* fill random pool and seed the current legacy RNG */ - RAND_POOL *pool = rand_pool_new(RAND_DRBG_STRENGTH, 1, - (RAND_DRBG_STRENGTH + 7) / 8, - RAND_POOL_MAX_LENGTH); + RAND_POOL *pool = ossl_rand_pool_new(RAND_DRBG_STRENGTH, 1, + (RAND_DRBG_STRENGTH + 7) / 8, + RAND_POOL_MAX_LENGTH); if (pool == NULL) return 0; @@ -139,14 +139,14 @@ int RAND_poll(void) goto err; if (meth->add == NULL - || meth->add(rand_pool_buffer(pool), - rand_pool_length(pool), - (rand_pool_entropy(pool) / 8.0)) == 0) + || meth->add(ossl_rand_pool_buffer(pool), + ossl_rand_pool_length(pool), + (ossl_rand_pool_entropy(pool) / 8.0)) == 0) goto err; ret = 1; err: - rand_pool_free(pool); + ossl_rand_pool_free(pool); } return ret; # else @@ -194,10 +194,10 @@ const RAND_METHOD *RAND_get_rand_method(void) default_RAND_meth = tmp_meth; } else { ENGINE_finish(e); - default_RAND_meth = &rand_meth; + default_RAND_meth = &ossl_rand_meth; } # else - default_RAND_meth = &rand_meth; + default_RAND_meth = &ossl_rand_meth; # endif } tmp_meth = default_RAND_meth; |