prov: update provider util to be less agressive about changing things unnecessarily

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)
This commit is contained in:
Pauli 2021-02-25 13:51:28 +10:00
parent fbff75caaa
commit 19ea8a8a21

View File

@ -72,6 +72,9 @@ int ossl_prov_cipher_load_from_params(PROV_CIPHER *pc,
const OSSL_PARAM *p; const OSSL_PARAM *p;
const char *propquery; const char *propquery;
if (params == NULL)
return 1;
if (!load_common(params, &propquery, &pc->engine)) if (!load_common(params, &propquery, &pc->engine))
return 0; return 0;
@ -140,10 +143,12 @@ int ossl_prov_digest_load_from_params(PROV_DIGEST *pd,
const OSSL_PARAM *p; const OSSL_PARAM *p;
const char *propquery; const char *propquery;
if (params == NULL)
return 1;
if (!load_common(params, &propquery, &pd->engine)) if (!load_common(params, &propquery, &pd->engine))
return 0; return 0;
p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST); p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST);
if (p == NULL) if (p == NULL)
return 1; return 1;