diff options
author | Pauli <ppzgs1@gmail.com> | 2021-02-17 02:54:01 +0100 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-02-23 14:24:41 +0100 |
commit | b3ab537b3a4098857d2039d1d745fee0ea5a96e3 (patch) | |
tree | bbb444f1340ff92dd95bae34bc1f37ff5e4eec56 /test/testutil.h | |
parent | rand: add DRBG/seed setting functions (diff) | |
download | openssl-b3ab537b3a4098857d2039d1d745fee0ea5a96e3.tar.xz openssl-b3ab537b3a4098857d2039d1d745fee0ea5a96e3.zip |
test: add framework for generic fake random number generator
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13652)
Diffstat (limited to 'test/testutil.h')
-rw-r--r-- | test/testutil.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testutil.h b/test/testutil.h index 491082c3f4..93c91a4a41 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -566,6 +566,11 @@ char *glue_strings(const char *list[], size_t *out_len); uint32_t test_random(void); void test_random_seed(uint32_t sd); +/* Fake non-secure random number generator */ +OSSL_PROVIDER *fake_rand_start(OSSL_LIB_CTX *libctx); +void fake_rand_finish(OSSL_PROVIDER *p); +void fake_rand_set_callback(int (*cb)(unsigned char *out, size_t outlen)); + /* Create a file path from a directory and a filename */ char *test_mk_file_path(const char *dir, const char *file); |