summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-02-26 10:56:17 +1000
committerPauli <ppzgs1@gmail.com>2021-02-28 17:25:49 +1000
commit7198bd1a8f44be994106d3dba4bbb3362147b144 (patch)
treeb2924a0d2ac3314a8596cca9ac117c2b9ac4d311 /test
parentb98d550d807eccde3bd3f88f9831e002d3835cc3 (diff)
test: update tests to allow for params argument for the instantiate call on EVP_RAND_CTXs
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14310)
Diffstat (limited to 'test')
-rw-r--r--test/acvp_test.c2
-rw-r--r--test/drbgtest.c6
-rw-r--r--test/evp_test.c7
3 files changed, 7 insertions, 8 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 6d7360b5b6..dab75a8a13 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -1383,7 +1383,7 @@ static int drbg_test(int id)
* A NULL personalisation string defaults to the built in so something
* non-NULL is needed if there is no personalisation string
*/
- if (!TEST_true(EVP_RAND_instantiate(ctx, 0, 0, (void *)"", 0))
+ if (!TEST_true(EVP_RAND_instantiate(ctx, 0, 0, (void *)"", 0, NULL))
|| !TEST_true(EVP_RAND_generate(ctx, returned_bits, returned_bits_len,
0, 0, NULL, 0))
|| !TEST_true(EVP_RAND_generate(ctx, returned_bits, returned_bits_len,
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 1276f726cc..07f123dce8 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -828,11 +828,11 @@ static int test_rand_prediction_resistance(void)
/* Initialise a three long DRBG chain */
if (!TEST_ptr(x = new_drbg(NULL))
|| !TEST_true(disable_crngt(x))
- || !TEST_true(EVP_RAND_instantiate(x, 0, 0, NULL, 0))
+ || !TEST_true(EVP_RAND_instantiate(x, 0, 0, NULL, 0, NULL))
|| !TEST_ptr(y = new_drbg(x))
- || !TEST_true(EVP_RAND_instantiate(y, 0, 0, NULL, 0))
+ || !TEST_true(EVP_RAND_instantiate(y, 0, 0, NULL, 0, NULL))
|| !TEST_ptr(z = new_drbg(y))
- || !TEST_true(EVP_RAND_instantiate(z, 0, 0, NULL, 0)))
+ || !TEST_true(EVP_RAND_instantiate(z, 0, 0, NULL, 0, NULL)))
goto err;
/*
diff --git a/test/evp_test.c b/test/evp_test.c
index ef7ddd37fe..8c88f0937c 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2259,16 +2259,15 @@ static int rand_test_run(EVP_TEST *t)
*p++ = OSSL_PARAM_construct_octet_string(OSSL_RAND_PARAM_TEST_NONCE,
z, item->nonce_len);
*p = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(expected->parent, params))
- || !TEST_true(EVP_RAND_instantiate(expected->parent, strength,
- 0, NULL, 0)))
+ if (!TEST_true(EVP_RAND_instantiate(expected->parent, strength,
+ 0, NULL, 0, params)))
goto err;
z = item->pers != NULL ? item->pers : (unsigned char *)"";
if (!TEST_true(EVP_RAND_instantiate
(expected->ctx, strength,
expected->prediction_resistance, z,
- item->pers_len)))
+ item->pers_len, NULL)))
goto err;
if (item->reseed_entropy != NULL) {