]> git.ipfire.org Git - thirdparty/openssl.git/commit - providers/fips/self_test_kats.c
fips selftest: avoid relying on a real RNG for self tests
authorPauli <pauli@openssl.org>
Tue, 5 Sep 2023 00:16:49 +0000 (10:16 +1000)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Sep 2023 16:22:54 +0000 (17:22 +0100)
commitfffa78c2fd01accd97c9229018d4c380f7a20335
tree2978f3f7b0bbf550f9824ec247cb3e01f723e1ef
parent54e60d2a05f86e947dface08e5c20b831be17bf8
fips selftest: avoid relying on a real RNG for self tests

Rather than instantiate the private and primary DRBGs during the
selftest, instead use a test RNG.  This leaves the DRBG setup
pristine and permits later replacement of the seed source despite
the very early running power up self tests.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21964)
crypto/rand/rand_lib.c
include/crypto/rand.h
providers/fips/self_test.c
providers/fips/self_test_kats.c
providers/implementations/rands/test_rng.c
util/perl/OpenSSL/paramnames.pm