openssl/crypto/rand
Matt Caswell 7f2c22c1b9 Avoid taking a write lock in RAND_get_rand_method()
The function RAND_get_rand_method() is called every time RAND_bytes() or
RAND_priv_bytes() is called. We were obtaining a write lock in order to
find the default random method - even though we rarely write. We change
this to a read lock and only fallback to a write lock if we need to.

Partial fix for #20286

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20929)
2023-05-30 17:19:11 +01:00
..
build.info
prov_seed.c
rand_deprecated.c
rand_egd.c
rand_err.c
rand_lib.c Avoid taking a write lock in RAND_get_rand_method() 2023-05-30 17:19:11 +01:00
rand_local.h
rand_meth.c
rand_pool.c
randfile.c