summaryrefslogtreecommitdiffstats
path: root/include/internal/provider.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-04-21 16:51:41 +0100
committerMatt Caswell <matt@openssl.org>2021-05-11 14:56:55 +0100
commitf12a5690de906c05031f0195b6dec6925ff27231 (patch)
tree9d4ea21b4d574ec86091c27cd1c530356534c2df /include/internal/provider.h
parenta16d21744df686a7c005d1f129915d9083476e14 (diff)
Add the concept of a child OSSL_LIB_CTX
Add a child OSSL_LIB_CTX that will mirror the providers loaded into the parent libctx. This is useful for providers that want to use algorithms from other providers and just need to inherit the providers used by the application. Fixes #14925 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14991)
Diffstat (limited to 'include/internal/provider.h')
-rw-r--r--include/internal/provider.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/internal/provider.h b/include/internal/provider.h
index 64fe2f1178..13b72ad2de 100644
--- a/include/internal/provider.h
+++ b/include/internal/provider.h
@@ -41,6 +41,7 @@ int ossl_provider_set_fallback(OSSL_PROVIDER *prov);
int ossl_provider_set_module_path(OSSL_PROVIDER *prov, const char *module_path);
int ossl_provider_add_parameter(OSSL_PROVIDER *prov, const char *name,
const char *value);
+void ossl_provider_set_child(OSSL_PROVIDER *prov);
/* Disable fallback loading */
int ossl_provider_disable_fallback_loading(OSSL_LIB_CTX *libctx);
@@ -69,6 +70,7 @@ const DSO *ossl_provider_dso(const OSSL_PROVIDER *prov);
const char *ossl_provider_module_name(const OSSL_PROVIDER *prov);
const char *ossl_provider_module_path(const OSSL_PROVIDER *prov);
void *ossl_provider_prov_ctx(const OSSL_PROVIDER *prov);
+const OSSL_DISPATCH *ossl_provider_get0_dispatch(const OSSL_PROVIDER *prov);
OSSL_LIB_CTX *ossl_provider_libctx(const OSSL_PROVIDER *prov);
/* Thin wrappers around calls to the provider */
@@ -96,6 +98,12 @@ int ossl_provider_clear_all_operation_bits(OSSL_LIB_CTX *libctx);
/* Configuration */
void ossl_provider_add_conf_module(void);
+/* Child providers */
+int ossl_provider_init_child_providers(OSSL_LIB_CTX *ctx);
+int ossl_provider_init_as_child(OSSL_LIB_CTX *ctx,
+ const OSSL_CORE_HANDLE *handle,
+ const OSSL_DISPATCH *in);
+
# ifdef __cplusplus
}
# endif