summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-26 13:08:54 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-11 11:42:06 +0100
commit67c91ca23eae175a08f0f0c60be6e6957334d25e (patch)
tree0be1bcc38d78ca44d8ae714fd1d913f99ac568a4 /include
parentebfdb63d96496274106b4192fda6039cbb272bae (diff)
DECODER: Add support for OSSL_FUNC_decoder_does_selection()
OSSL_FUNC_decoder_does_selection() is a dispatchable decoder implementation function that should return 1 if the given |selection| is supported by an decoder 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: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13248)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/core_dispatch.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h
index 3b0cf3d3ed..cc8e6712ed 100644
--- a/include/openssl/core_dispatch.h
+++ b/include/openssl/core_dispatch.h
@@ -789,8 +789,9 @@ OSSL_CORE_MAKE_FUNC(void, encoder_free_object, (void *obj))
# define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
# define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
# define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
-# define OSSL_FUNC_DECODER_DECODE 10
-# define OSSL_FUNC_DECODER_EXPORT_OBJECT 11
+# define OSSL_FUNC_DECODER_DOES_SELECTION 10
+# define OSSL_FUNC_DECODER_DECODE 11
+# define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
OSSL_CORE_MAKE_FUNC(void *, decoder_newctx, (void *provctx))
OSSL_CORE_MAKE_FUNC(void, decoder_freectx, (void *ctx))
OSSL_CORE_MAKE_FUNC(int, decoder_get_params, (OSSL_PARAM params[]))
@@ -801,8 +802,10 @@ OSSL_CORE_MAKE_FUNC(int, decoder_set_ctx_params,
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_settable_ctx_params,
(void *provctx))
+OSSL_CORE_MAKE_FUNC(int, decoder_does_selection,
+ (void *provctx, int selection))
OSSL_CORE_MAKE_FUNC(int, decoder_decode,
- (void *ctx, OSSL_CORE_BIO *in,
+ (void *ctx, OSSL_CORE_BIO *in, int selection,
OSSL_CALLBACK *metadata_cb, void *metadata_cbarg,
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
OSSL_CORE_MAKE_FUNC(int, decoder_export_object,