From 19ea8a8a215c2fc637b3e3664c75fc0636189459 Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 25 Feb 2021 13:51:28 +1000 Subject: [PATCH] prov: update provider util to be less agressive about changing things unnecessarily Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/14310) --- providers/common/provider_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/providers/common/provider_util.c b/providers/common/provider_util.c index 0df2addccb..6ed4378a2f 100644 --- a/providers/common/provider_util.c +++ b/providers/common/provider_util.c @@ -72,6 +72,9 @@ int ossl_prov_cipher_load_from_params(PROV_CIPHER *pc, const OSSL_PARAM *p; const char *propquery; + if (params == NULL) + return 1; + if (!load_common(params, &propquery, &pc->engine)) return 0; @@ -140,10 +143,12 @@ int ossl_prov_digest_load_from_params(PROV_DIGEST *pd, const OSSL_PARAM *p; const char *propquery; + if (params == NULL) + return 1; + if (!load_common(params, &propquery, &pd->engine)) return 0; - p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST); if (p == NULL) return 1;