test-rand: return failure on not enough data, allow parent
authorPauli <pauli@openssl.org>
Mon, 25 Oct 2021 02:01:11 +0000 (12:01 +1000)
committerPauli <pauli@openssl.org>
Tue, 26 Oct 2021 10:02:55 +0000 (20:02 +1000)
commitd4dfd983e32b32b633aaa9edec422cc30419c6f7
tree12da0013339da819a29c042a900830774ddb0a87
parente2e3f84fa5e96eb97b3cde46a213867fa79f235c
test-rand: return failure on not enough data, allow parent

The test-rand RNG was returning success when it had some but insufficient data.
Now, it returns failure and doesn't advance the data pointer.

The test-rand RNG was failing when a parent was specified.  This case is now
ignored.

Fixes #16785

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16905)
doc/man7/EVP_RAND-TEST-RAND.pod
providers/implementations/rands/test_rng.c
test/build.info
test/rand_test.c [new file with mode: 0644]
test/recipes/05-test_rand.t