Fix size limitation of RAND_DRBG_bytes()
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sat, 3 Feb 2018 21:32:47 +0000 (22:32 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Mon, 5 Feb 2018 19:05:14 +0000 (20:05 +0100)
commit1648338ba1a63c19c7bae32170cd1d825b48eaee
tree8bf6b1599d5989a9af9e8236d5fcb4b434a6a3a8
parent58351fbd02e9960af199df99f6f003419c1487a4
Fix size limitation of RAND_DRBG_bytes()

When comparing the implementations of drbg_bytes() and RAND_DRBG_bytes(),
it was noticed that the former split the buffer into chunks when calling
RAND_DRBG_generate() to circumvent the size limitation of the buffer
to outlen <= drb->max_request. This loop was missing in RAND_DRBG_bytes(),
so it was adopted from drbg_bytes().

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