mirror of https://github.com/openssl/openssl.git
evp: support modified gettable/settable ctx calls for RNGs
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14240)
This commit is contained in:
parent
1c9eaf4251
commit
caa60428cd
|
@ -428,18 +428,42 @@ const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand)
|
||||||
|
|
||||||
const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand)
|
const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand)
|
||||||
{
|
{
|
||||||
|
void *provctx;
|
||||||
|
|
||||||
if (rand->gettable_ctx_params == NULL)
|
if (rand->gettable_ctx_params == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return rand->gettable_ctx_params(
|
provctx = ossl_provider_ctx(EVP_RAND_provider(rand));
|
||||||
ossl_provider_ctx(EVP_RAND_provider(rand)));
|
return rand->gettable_ctx_params(NULL, provctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand)
|
const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand)
|
||||||
{
|
{
|
||||||
|
void *provctx;
|
||||||
|
|
||||||
if (rand->settable_ctx_params == NULL)
|
if (rand->settable_ctx_params == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return rand->settable_ctx_params(
|
provctx = ossl_provider_ctx(EVP_RAND_provider(rand));
|
||||||
ossl_provider_ctx(EVP_RAND_provider(rand)));
|
return rand->settable_ctx_params(NULL, provctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx)
|
||||||
|
{
|
||||||
|
void *provctx;
|
||||||
|
|
||||||
|
if (ctx->meth->gettable_ctx_params == NULL)
|
||||||
|
return NULL;
|
||||||
|
provctx = ossl_provider_ctx(EVP_RAND_provider(ctx->meth));
|
||||||
|
return ctx->meth->gettable_ctx_params(ctx->data, provctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx)
|
||||||
|
{
|
||||||
|
void *provctx;
|
||||||
|
|
||||||
|
if (ctx->meth->settable_ctx_params == NULL)
|
||||||
|
return NULL;
|
||||||
|
provctx = ossl_provider_ctx(EVP_RAND_provider(ctx->meth));
|
||||||
|
return ctx->meth->settable_ctx_params(ctx->data, provctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
|
void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
|
||||||
|
|
|
@ -1176,6 +1176,8 @@ int EVP_RAND_set_ctx_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]);
|
||||||
const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
|
const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
|
||||||
const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
|
const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
|
||||||
const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
|
const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
|
||||||
|
const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
|
||||||
|
const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
|
||||||
|
|
||||||
void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
|
void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
|
||||||
void (*fn)(EVP_RAND *rand, void *arg),
|
void (*fn)(EVP_RAND *rand, void *arg),
|
||||||
|
|
|
@ -5302,5 +5302,7 @@ EVP_PKEY_fromdata_settable ? 3_0_0 EXIST::FUNCTION:
|
||||||
EVP_PKEY_param_check_quick ? 3_0_0 EXIST::FUNCTION:
|
EVP_PKEY_param_check_quick ? 3_0_0 EXIST::FUNCTION:
|
||||||
EVP_PKEY_public_check_quick ? 3_0_0 EXIST::FUNCTION:
|
EVP_PKEY_public_check_quick ? 3_0_0 EXIST::FUNCTION:
|
||||||
EVP_PKEY_CTX_is_a ? 3_0_0 EXIST::FUNCTION:
|
EVP_PKEY_CTX_is_a ? 3_0_0 EXIST::FUNCTION:
|
||||||
|
EVP_RAND_CTX_gettable_params ? 3_0_0 EXIST::FUNCTION:
|
||||||
|
EVP_RAND_CTX_settable_params ? 3_0_0 EXIST::FUNCTION:
|
||||||
RAND_set_DRBG_type ? 3_0_0 EXIST::FUNCTION:
|
RAND_set_DRBG_type ? 3_0_0 EXIST::FUNCTION:
|
||||||
RAND_set_seed_source_type ? 3_0_0 EXIST::FUNCTION:
|
RAND_set_seed_source_type ? 3_0_0 EXIST::FUNCTION:
|
||||||
|
|
Loading…
Reference in New Issue