summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-02-26 10:57:21 +1000
committerPauli <ppzgs1@gmail.com>2021-02-28 17:25:49 +1000
commitd5a936c5b1c2f0c6f882c0cfd2ff34f8845260f7 (patch)
tree133be7179c3c8f574a292b468fad92a751f6f4e2 /crypto/rand
parentdbf299f73df80c7b5695f1311837686d84f1be18 (diff)
rand: use params argument on instantiate call
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14310)
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/rand_lib.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 2a4055f617..0ee57dc460 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -523,7 +523,7 @@ static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx)
ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
return NULL;
}
- if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0)) {
+ if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
EVP_RAND_CTX_free(ctx);
return NULL;
@@ -574,12 +574,7 @@ static EVP_RAND_CTX *rand_new_drbg(OSSL_LIB_CTX *libctx, EVP_RAND_CTX *parent,
*p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
&reseed_time_interval);
*p = OSSL_PARAM_construct_end();
- if (!EVP_RAND_set_ctx_params(ctx, params)) {
- ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INITIALISING_DRBG);
- EVP_RAND_CTX_free(ctx);
- return NULL;
- }
- if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0)) {
+ if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
EVP_RAND_CTX_free(ctx);
return NULL;