aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2021-04-16 09:13:43 +1000
committerPauli <pauli@openssl.org>2021-04-17 18:22:13 +1000
commite494fac705057c91017b41fa761f9406c87f4cc5 (patch)
tree133c928c393002291a2f0ef61de870ddc2cbe8ef /test
parent7b9f02798f68d9108623f5879f3fc73c06f9a2c7 (diff)
downloadopenssl-e494fac705057c91017b41fa761f9406c87f4cc5.tar.gz
Fix naming for EVP_RAND_CTX_gettable functions.
Change: EVP_RAND_gettable_ctx_params -> EVP_RAND_CTX_gettable_params EVP_RAND_settable_ctx_params -> EVP_RAND_CTX_settable_params Which brings them in line with the other similar functions for other algorithm types. Fixes #14880 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14893)
Diffstat (limited to 'test')
-rw-r--r--test/acvp_test.c6
-rw-r--r--test/drbgtest.c8
-rw-r--r--test/evp_extra_test.c2
-rw-r--r--test/evp_test.c10
4 files changed, 13 insertions, 13 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index daa2e6843a..c2b024da01 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -1351,7 +1351,7 @@ static int drbg_test(int id)
params[0] = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, &strength);
params[1] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(parent, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(parent, params)))
goto err;
/* Get the DRBG */
@@ -1365,7 +1365,7 @@ static int drbg_test(int id)
params[1] = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
(char *)tst->cipher, 0);
params[2] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(ctx, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(ctx, params)))
goto err;
/* Feed in the entropy and nonce */
@@ -1376,7 +1376,7 @@ static int drbg_test(int id)
(void *)tst->nonce,
tst->nonce_len);
params[2] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(parent, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(parent, params)))
goto err;
/*
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 07f123dce8..70e062ce75 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -90,7 +90,7 @@ static unsigned int query_rand_uint(EVP_RAND_CTX *drbg, const char *name)
unsigned int n;
*params = OSSL_PARAM_construct_uint(name, &n);
- if (EVP_RAND_get_ctx_params(drbg, params))
+ if (EVP_RAND_CTX_get_params(drbg, params))
return n;
return 0;
}
@@ -125,7 +125,7 @@ static time_t reseed_time(EVP_RAND_CTX *drbg)
time_t t;
*params = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME, &t);
- if (EVP_RAND_get_ctx_params(drbg, params))
+ if (EVP_RAND_CTX_get_params(drbg, params))
return t;
return 0;
}
@@ -691,7 +691,7 @@ static int set_reseed_time_interval(EVP_RAND_CTX *drbg, int t)
params[0] = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
&t);
params[1] = OSSL_PARAM_construct_end();
- return EVP_RAND_set_ctx_params(drbg, params);
+ return EVP_RAND_CTX_set_params(drbg, params);
}
static void run_multi_thread_test(void)
@@ -808,7 +808,7 @@ static EVP_RAND_CTX *new_drbg(EVP_RAND_CTX *parent)
if (!TEST_ptr(rand = EVP_RAND_fetch(NULL, "CTR-DRBG", NULL))
|| !TEST_ptr(drbg = EVP_RAND_CTX_new(rand, parent))
- || !TEST_true(EVP_RAND_set_ctx_params(drbg, params))) {
+ || !TEST_true(EVP_RAND_CTX_set_params(drbg, params))) {
EVP_RAND_CTX_free(drbg);
drbg = NULL;
}
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index afba7ea75b..24eff86c5d 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -2416,7 +2416,7 @@ static int test_rand_agglomeration(void)
seed, sizeof(seed));
*p++ = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_MAX_REQUEST, &step);
*p = OSSL_PARAM_construct_end();
- res = TEST_true(EVP_RAND_set_ctx_params(ctx, params))
+ res = TEST_true(EVP_RAND_CTX_set_params(ctx, params))
&& TEST_true(EVP_RAND_generate(ctx, out, sizeof(out), 0, 1, NULL, 0))
&& TEST_mem_eq(seed, sizeof(seed), out, sizeof(out));
EVP_RAND_CTX_free(ctx);
diff --git a/test/evp_test.c b/test/evp_test.c
index 503aaa0e8e..08341e4617 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2117,7 +2117,7 @@ static int rand_test_init(EVP_TEST *t, const char *name)
goto err;
*params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, &strength);
- if (!EVP_RAND_set_ctx_params(rdata->parent, params))
+ if (!EVP_RAND_CTX_set_params(rdata->parent, params))
goto err;
rand = EVP_RAND_fetch(libctx, name, NULL);
@@ -2250,7 +2250,7 @@ static int rand_test_run(EVP_TEST *t)
expected->digest, 0);
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_MAC, "HMAC", 0);
*p = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(expected->ctx, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(expected->ctx, params)))
goto err;
strength = EVP_RAND_strength(expected->ctx);
@@ -2281,7 +2281,7 @@ static int rand_test_run(EVP_TEST *t)
(OSSL_RAND_PARAM_TEST_ENTROPY, item->reseed_entropy,
item->reseed_entropy_len);
params[1] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(expected->parent, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(expected->parent, params)))
goto err;
if (!TEST_true(EVP_RAND_reseed
@@ -2295,7 +2295,7 @@ static int rand_test_run(EVP_TEST *t)
(OSSL_RAND_PARAM_TEST_ENTROPY, item->pr_entropyA,
item->pr_entropyA_len);
params[1] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(expected->parent, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(expected->parent, params)))
goto err;
}
if (!TEST_true(EVP_RAND_generate
@@ -2309,7 +2309,7 @@ static int rand_test_run(EVP_TEST *t)
(OSSL_RAND_PARAM_TEST_ENTROPY, item->pr_entropyB,
item->pr_entropyB_len);
params[1] = OSSL_PARAM_construct_end();
- if (!TEST_true(EVP_RAND_set_ctx_params(expected->parent, params)))
+ if (!TEST_true(EVP_RAND_CTX_set_params(expected->parent, params)))
return 0;
}
if (!TEST_true(EVP_RAND_generate