openssl/crypto/rand
Dr. Matthias St. Pierre bc420ebea2 rand_lib.c: Don't open random devices while cleaning up.
Fixes #7022

In pull request #6432 a change was made to keep the handles to the
random devices opened in order to avoid reseeding problems for
applications in chroot environments.

As a consequence, the handles of the random devices were leaked at exit
if the random generator was not used by the application. This happened,
because the call to RAND_set_rand_method(NULL) in rand_cleanup_int()
triggered a call to the call_once function do_rand_init, which opened
the random devices via rand_pool_init().

Thanks to GitHub user @bwelling for reporting this issue.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7023)
2018-08-22 10:53:49 +02:00
..
build.info crypto/rand: rename drbg_rand.c to drbg_ctr.c 2018-01-04 11:47:30 +10:00
drbg_ctr.c DRBG: Use the EVP layer to do AES encryption 2018-03-21 21:32:47 +01:00
drbg_lib.c Use void in all function definitions that do not take any arguments 2018-05-11 14:37:48 +02:00
rand_egd.c Update copyright year 2018-05-29 13:16:04 +01:00
rand_err.c make update 2018-04-13 23:48:41 +02:00
rand_lcl.h Make sure we use a nonce when a nonce is required 2018-04-01 21:11:26 +02:00
rand_lib.c rand_lib.c: Don't open random devices while cleaning up. 2018-08-22 10:53:49 +02:00
rand_unix.c rand_unix.c: don't discard entropy bytes from /dev/*random 2018-08-19 12:44:05 +02:00
rand_vms.c Modify the DEVRANDOM source so that the files are kept open persistently. 2018-06-27 07:15:36 +10:00
rand_win.c Modify the DEVRANDOM source so that the files are kept open persistently. 2018-06-27 07:15:36 +10:00
randfile.c rand/randfile.c: fix potential resource leak in RAND_load_file. 2018-04-04 20:27:59 +02:00