diff options
author | Pauli <paul.dale@oracle.com> | 2020-08-05 13:23:16 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-08-07 08:02:14 +1000 |
commit | 18ec26babc1da90befc0bf5671bc8072428c5bab (patch) | |
tree | 12b580d017270348d81f9fa1b81b095f0cc36819 /crypto/evp/evp_rand.c | |
parent | c5ec6dcf0bdd15354a1440632766e19540487c58 (diff) |
gettables: core changes to pass the provider context.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12581)
Diffstat (limited to 'crypto/evp/evp_rand.c')
-rw-r--r-- | crypto/evp/evp_rand.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/crypto/evp/evp_rand.c b/crypto/evp/evp_rand.c index 9273fd9c19..9056f6d20b 100644 --- a/crypto/evp/evp_rand.c +++ b/crypto/evp/evp_rand.c @@ -377,19 +377,25 @@ 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) { - return rand->gettable_params == NULL ? NULL : rand->gettable_params(); + if (rand->gettable_params == NULL) + return NULL; + return rand->gettable_params(ossl_provider_ctx(EVP_RAND_provider(rand))); } const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand) { - return rand->gettable_ctx_params == NULL ? NULL - : rand->gettable_ctx_params(); + if (rand->gettable_params == NULL) + return NULL; + return rand->gettable_ctx_params( + ossl_provider_ctx(EVP_RAND_provider(rand))); } const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand) { - return rand->settable_ctx_params == NULL ? NULL - : rand->settable_ctx_params(); + if (rand->gettable_params == NULL) + return NULL; + return rand->settable_ctx_params( + ossl_provider_ctx(EVP_RAND_provider(rand))); } void EVP_RAND_do_all_provided(OPENSSL_CTX *libctx, |