diff options
author | Richard Levitte <levitte@openssl.org> | 2019-04-30 13:41:51 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-04-30 15:34:23 +0200 |
commit | a39eb84006ca68d38d1c7204a6135647d06b5d01 (patch) | |
tree | a39170c4d6ece3fc94ae7fc4e09a97d4b090f00f /doc/internal | |
parent | f79858ac4d90a450d0620d1ecb713bc35d7d9f8d (diff) |
Replumbing: give the possibility for the provider to create a context
OSSL_provider_init() gets another output parameter, holding a pointer
to a provider side context. It's entirely up to the provider to
define the context and what it's being used for. This pointer is
passed back to other provider functions, typically the provider global
get_params and set_params functions, and also the diverse algorithm
context creators, and of course, the teardown function.
With this, a provider can be instantiated more than once, or be
re-loaded as the case may be, while maintaining instance state.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8848)
Diffstat (limited to 'doc/internal')
-rw-r--r-- | doc/internal/man3/ossl_provider_new.pod | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/internal/man3/ossl_provider_new.pod b/doc/internal/man3/ossl_provider_new.pod index aa984c93b8..04535086be 100644 --- a/doc/internal/man3/ossl_provider_new.pod +++ b/doc/internal/man3/ossl_provider_new.pod @@ -5,7 +5,7 @@ ossl_provider_find, ossl_provider_new, ossl_provider_upref, ossl_provider_free, ossl_provider_add_module_location, ossl_provider_set_fallback, ossl_provider_activate, -ossl_provider_forall_loaded, +ossl_provider_ctx, ossl_provider_forall_loaded, ossl_provider_name, ossl_provider_dso, ossl_provider_module_name, ossl_provider_module_path, ossl_provider_teardown, ossl_provider_get_param_types, @@ -29,6 +29,9 @@ ossl_provider_get_params, ossl_provider_query_operation /* Load and initialize the Provider */ int ossl_provider_activate(OSSL_PROVIDER *prov); + /* Return pointer to the provider's context */ + void *ossl_provider_ctx(const OSSL_PROVIDER *prov); + /* Iterate over all loaded providers */ int ossl_provider_forall_loaded(OPENSSL_CTX *, int (*cb)(OSSL_PROVIDER *provider, @@ -121,6 +124,10 @@ be located in that module, and called. =back +ossl_provider_ctx() returns a context created by the provider. +Outside of the provider, it's completely opaque, but it needs to be +passed back to some of the provider functions. + ossl_provider_forall_loaded() iterates over all the currently "activated" providers, and calls C<cb> for each of them. If no providers have been "activated" yet, it tries to activate all |