diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-17 08:17:41 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-11 12:43:27 +0100 |
commit | cd861ab73d57ea21dd7342b13f4a733da229e15e (patch) | |
tree | 2053867e039904f8dfad6794ac775d668e34796a /include | |
parent | 8a98a507fb9a06254c79af4d9c9104f5f300a032 (diff) |
ENCODER: Add support for OSSL_FUNC_encoder_does_selection()
OSSL_FUNC_encoder_does_selection() is a dispatchable encoder implementation
function that should return 1 if the given |selection| is supported by an
encoder implementation and 0 if not. This can be used by libcrypto
functionality to figure out if an encoder implementation should be
considered or not.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13167)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/core_dispatch.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h index cc8e6712ed..d4d581df57 100644 --- a/include/openssl/core_dispatch.h +++ b/include/openssl/core_dispatch.h @@ -756,7 +756,8 @@ OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_settable_ctx_params, (void *provctx) # define OSSL_FUNC_ENCODER_GETTABLE_PARAMS 4 # define OSSL_FUNC_ENCODER_SET_CTX_PARAMS 5 # define OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS 6 -# define OSSL_FUNC_ENCODER_ENCODE 10 +# define OSSL_FUNC_ENCODER_DOES_SELECTION 10 +# define OSSL_FUNC_ENCODER_ENCODE 11 # define OSSL_FUNC_ENCODER_IMPORT_OBJECT 20 # define OSSL_FUNC_ENCODER_FREE_OBJECT 21 OSSL_CORE_MAKE_FUNC(void *, encoder_newctx, (void *provctx)) @@ -769,10 +770,8 @@ OSSL_CORE_MAKE_FUNC(int, encoder_set_ctx_params, OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_settable_ctx_params, (void *provctx)) -/* - * TODO(3.0) investigate if this should be two functions, one that takes a - * raw object and one that takes an object abstraction. - */ +OSSL_CORE_MAKE_FUNC(int, encoder_does_selection, + (void *provctx, int selection)) OSSL_CORE_MAKE_FUNC(int, encoder_encode, (void *ctx, OSSL_CORE_BIO *out, const void *obj_raw, const OSSL_PARAM obj_abstract[], |