summaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-08-05 13:23:16 +1000
committerPauli <paul.dale@oracle.com>2020-08-07 08:02:14 +1000
commit18ec26babc1da90befc0bf5671bc8072428c5bab (patch)
tree12b580d017270348d81f9fa1b81b095f0cc36819 /crypto/evp/digest.c
parentc5ec6dcf0bdd15354a1440632766e19540487c58 (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/digest.c')
-rw-r--r--crypto/evp/digest.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 3d25b75be7..58cd160502 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -557,7 +557,8 @@ int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[])
const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest)
{
if (digest != NULL && digest->gettable_params != NULL)
- return digest->gettable_params();
+ return digest->gettable_params(
+ ossl_provider_ctx(EVP_MD_provider(digest)));
return NULL;
}
@@ -581,7 +582,7 @@ int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[])
const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md)
{
if (md != NULL && md->settable_ctx_params != NULL)
- return md->settable_ctx_params();
+ return md->settable_ctx_params(ossl_provider_ctx(EVP_MD_provider(md)));
return NULL;
}
@@ -589,10 +590,12 @@ const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx)
{
EVP_PKEY_CTX *pctx;
- if (ctx != NULL
- && ctx->digest != NULL
- && ctx->digest->settable_ctx_params != NULL)
- return ctx->digest->settable_ctx_params();
+ if (ctx == NULL)
+ return NULL;
+
+ if (ctx->digest != NULL && ctx->digest->settable_ctx_params != NULL)
+ return ctx->digest->settable_ctx_params(
+ ossl_provider_ctx(EVP_MD_provider(ctx->digest)));
pctx = ctx->pctx;
if (pctx != NULL
@@ -627,7 +630,7 @@ int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[])
const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md)
{
if (md != NULL && md->gettable_ctx_params != NULL)
- return md->gettable_ctx_params();
+ return md->gettable_ctx_params(ossl_provider_ctx(EVP_MD_provider(md)));
return NULL;
}
@@ -638,7 +641,8 @@ const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx)
if (ctx != NULL
&& ctx->digest != NULL
&& ctx->digest->gettable_ctx_params != NULL)
- return ctx->digest->gettable_ctx_params();
+ return ctx->digest->gettable_ctx_params(
+ ossl_provider_ctx(EVP_MD_provider(ctx->digest)));
pctx = ctx->pctx;
if (pctx != NULL