mirror of
https://github.com/openssl/openssl.git
synced 2025-03-31 20:10:45 +08:00
update set_ctx_param DRBG calls to return 1 for a NULL params
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14383)
This commit is contained in:
parent
5a6b62bb42
commit
20b8dc6fb1
@ -915,6 +915,9 @@ int ossl_drbg_set_ctx_params(PROV_DRBG *drbg, const OSSL_PARAM params[])
|
||||
{
|
||||
const OSSL_PARAM *p;
|
||||
|
||||
if (params == NULL)
|
||||
return 1;
|
||||
|
||||
p = OSSL_PARAM_locate_const(params, OSSL_DRBG_PARAM_RESEED_REQUESTS);
|
||||
if (p != NULL && !OSSL_PARAM_get_uint(p, &drbg->reseed_interval))
|
||||
return 0;
|
||||
|
@ -183,6 +183,9 @@ static int test_rng_set_ctx_params(void *vtest, const OSSL_PARAM params[])
|
||||
void *ptr = NULL;
|
||||
size_t size = 0;
|
||||
|
||||
if (params == NULL)
|
||||
return 1;
|
||||
|
||||
p = OSSL_PARAM_locate_const(params, OSSL_RAND_PARAM_STRENGTH);
|
||||
if (p != NULL && !OSSL_PARAM_get_uint(p, &t->strength))
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user