Use RAND_DRBG_bytes() for RAND_bytes() and RAND_priv_bytes()
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sat, 3 Feb 2018 21:33:19 +0000 (22:33 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Mon, 5 Feb 2018 19:05:14 +0000 (20:05 +0100)
commitf61f62ea13470a00ae8be691d62abec97f94f0ee
tree3af25eca72242c36d5bcb841ae77402b427d1198
parent1648338ba1a63c19c7bae32170cd1d825b48eaee
Use RAND_DRBG_bytes() for RAND_bytes() and RAND_priv_bytes()

The functions RAND_bytes() and RAND_priv_bytes() are now both based
on a common implementation using RAND_DRBG_bytes() (if the default
OpenSSL rand method is active). This not only simplifies the code
but also has the advantage that additional input from a high precision
timer is added on every generate call if the timer is available.

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/5251)
crypto/rand/drbg_lib.c
crypto/rand/rand_lib.c