{
struct child_prov_globals *gbl = vgbl;
- gbl->c_provider_deregister_child_cb(gbl->handle);
CRYPTO_THREAD_lock_free(gbl->lock);
OPENSSL_free(gbl);
}
return 1;
}
+void ossl_provider_deinit_child(OSSL_LIB_CTX *ctx)
+{
+ struct child_prov_globals *gbl
+ = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_CHILD_PROVIDER_INDEX,
+ &child_prov_ossl_ctx_method);
+ if (gbl == NULL)
+ return;
+
+ gbl->c_provider_deregister_child_cb(gbl->handle);
+}
+
int ossl_provider_up_ref_parent(OSSL_PROVIDER *prov, int activate)
{
struct child_prov_globals *gbl;
ossl_provider_add_parameter, ossl_provider_set_child, ossl_provider_get_parent,
ossl_provider_up_ref_parent, ossl_provider_free_parent,
ossl_provider_default_props_update, ossl_provider_get0_dispatch,
-ossl_provider_init_as_child,
+ossl_provider_init_as_child, ossl_provider_deinit_child,
ossl_provider_activate, ossl_provider_deactivate, ossl_provider_add_to_store,
ossl_provider_ctx,
ossl_provider_doall_activated,
int ossl_provider_init_as_child(OSSL_LIB_CTX *ctx,
const OSSL_CORE_HANDLE *handle,
const OSSL_DISPATCH *in);
-
+ void ossl_provider_deinit_child(OSSL_LIB_CTX *ctx);
=head1 DESCRIPTION
parameters are the B<OSSL_CORE_HANDLE> and B<OSSL_DISPATCH> pointers that were
passed to the provider's B<OSSL_provider_init> function.
+ossl_provider_deinit_child() deregisters callbacks from the parent library
+context about provider creation or removal events for the child library context
+I<ctx>. Must only be called if I<ctx> is a child library context.
+
=head1 NOTES
Locating a provider module happens as follows:
int ossl_provider_init_as_child(OSSL_LIB_CTX *ctx,
const OSSL_CORE_HANDLE *handle,
const OSSL_DISPATCH *in);
+void ossl_provider_deinit_child(OSSL_LIB_CTX *ctx);
# ifdef __cplusplus
}