diff options
author | Matt Caswell <matt@openssl.org> | 2021-05-05 14:43:19 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-05-11 15:03:13 +0100 |
commit | 878be71c2d284d1fc4d591fdbbfb14eed63da10f (patch) | |
tree | 03a6de8d4324f7f7c593699c131d585406ec0f48 /doc/man7 | |
parent | fb9b3a7bce236c96d8db37e52db83997b4cb18db (diff) |
Update documentation following addition of OSSL_LIB_CTX_new_child()
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14991)
Diffstat (limited to 'doc/man7')
-rw-r--r-- | doc/man7/provider-base.pod | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/man7/provider-base.pod b/doc/man7/provider-base.pod index c07f9fddf6..fe48beb1d1 100644 --- a/doc/man7/provider-base.pod +++ b/doc/man7/provider-base.pod @@ -80,6 +80,21 @@ provider-base void cleanup_nonce(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); + /* Functions for querying the providers in the application library context */ + int provider_register_child_cb(const OSSL_CORE_HANDLE *handle, + int (*create_cb)(const OSSL_CORE_HANDLE *provider, + void *cbdata), + int (*remove_cb)(const OSSL_CORE_HANDLE *provider, + void *cbdata), + void *cbdata); + void provider_deregister_child_cb(const OSSL_CORE_HANDLE *handle); + const char *provider_name(const OSSL_CORE_HANDLE *prov); + void *provider_get0_provider_ctx(const OSSL_CORE_HANDLE *prov); + const OSSL_DISPATCH *provider_get0_dispatch(const OSSL_CORE_HANDLE *prov); + int provider_up_ref(const OSSL_CORE_HANDLE *prov, int activate); + int provider_free(const OSSL_CORE_HANDLE *prov, int deactivate); + + /* Functions offered by the provider to libcrypto */ void provider_teardown(void *provctx); const OSSL_ITEM *provider_gettable_params(void *provctx); @@ -260,6 +275,45 @@ cleanup_nonce() is used to clean up and free the buffer returned by get_nonce(). The nonce pointer returned by get_nonce() is passed in B<buf> and its length in B<len>. +provider_register_child_cb() registers callbacks for being informed about the +loading and unloading of providers in the application's library context. +I<handle> is this provider's handle and I<cbdata> is this provider's data +that will be passed back to the callbacks. It returns 1 on success or 0 +otherwise. + +I<create_cb> is a callback that will be called when a new provider is loaded +into the application's library context. It is also called for any providers that +are already loaded at the point that this callback is registered. The callback +is passed the handle being used for the new provider being loadded and this +provider's data in I<cbdata>. It should return 1 on success or 0 on failure. + +I<remove_cb> is a callback that will be called when a new provider is unloaded +from the application's library context. It is passed the handle being used for +the provider being unloaded and this provider's data in I<cbdata>. It should +return 1 on success or 0 on failure. + +provider_deregister_child_cb() unregisters callbacks previously registered via +provider_register_child_cb(). If provider_register_child_cb() has been called +then provider_deregister_child_cb() should be called at or before the point that +this provider's teardown function is called. + +provider_name() returns a string giving the name of the provider identified by +I<handle>. + +provider_get0_provider_ctx() returns the provider context that is associated +with the provider identified by I<prov>. + +provider_get0_dispatch() gets the dispatch table registered by the provider +identified by I<prov> when it initialised. + +provider_up_ref() increments the reference count on the provider I<prov>. If +I<activate> is nonzero then the provider is also loaded if it is not already +loaded. It returns 1 on success or 0 on failure. + +provider_free() decrements the reference count on the provider I<prov>. If +I<deactivate> is nonzero then the provider is also unloaded if it is not +already loaded. It returns 1 on success or 0 on failure. + =head2 Provider functions provider_teardown() is called when a provider is shut down and removed |