diff options
author | Pauli <paul.dale@oracle.com> | 2020-04-21 10:49:19 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-22 13:56:44 +1000 |
commit | 8d5fb6485282c79bfe9f1ebab14eab515910e370 (patch) | |
tree | 7fe3b356021db7eba7529a9569d2c61348324e99 /include | |
parent | 07caec83b81859ea9aa2d5075a394aa48c4e5fae (diff) |
params: add functionality to test if an OSSL_PARAM has been set.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11588)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/params.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/openssl/params.h b/include/openssl/params.h index cd0f7846d7..441dfbbe0e 100644 --- a/include/openssl/params.h +++ b/include/openssl/params.h @@ -18,11 +18,13 @@ extern "C" { # endif +# define OSSL_PARAM_UNMODIFIED ((size_t)-1) + # define OSSL_PARAM_END \ { NULL, 0, NULL, 0, 0 } # define OSSL_PARAM_DEFN(key, type, addr, sz) \ - { (key), (type), (addr), (sz), 0 } + { (key), (type), (addr), (sz), OSSL_PARAM_UNMODIFIED } /* Basic parameter types without return sizes */ # define OSSL_PARAM_int(key, addr) \ @@ -135,6 +137,9 @@ int OSSL_PARAM_get_octet_ptr(const OSSL_PARAM *p, const void **val, int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val, size_t used_len); +int OSSL_PARAM_modified(const OSSL_PARAM *p); +void OSSL_PARAM_set_unmodified(OSSL_PARAM *p); + # ifdef __cplusplus } # endif |