diff options
author | slontis <shane.lontis@oracle.com> | 2024-09-20 10:34:08 +1000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-10-09 11:13:46 +0200 |
commit | f5981c9629667a5a5d63cf1f88903ee6b54a45e3 (patch) | |
tree | f5bc4a5014f3740073145e59a374486ab57eaa8b /providers/common/include | |
parent | 187952d449e4ec6c4fe71a537fa26005556e461a (diff) |
Add utility function ossl_param_is_empty()
Changed all provider implementations that have a set_ctx_params()
to call this function instead of just testing (params == NULL).This
detects the case wherean OSSL_PARAM array contains just a terminator
entry.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25499)
Diffstat (limited to 'providers/common/include')
-rw-r--r-- | providers/common/include/prov/providercommon.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/providers/common/include/prov/providercommon.h b/providers/common/include/prov/providercommon.h index 6366547e7c..4a1a043a84 100644 --- a/providers/common/include/prov/providercommon.h +++ b/providers/common/include/prov/providercommon.h @@ -22,3 +22,8 @@ void ossl_set_error_state(const char *type); /* Return true if the module is in a usable condition */ int ossl_prov_is_running(void); + +static ossl_inline int ossl_param_is_empty(const OSSL_PARAM params[]) +{ + return params == NULL || params->key == NULL; +} |