From a883c02faa2549c98256577fd881af17b95444cf Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 10 Jul 2019 23:11:27 +0200 Subject: Add internal function ossl_algorithm_do_all() This function is used to traverse all the implementations provided by one provider, or all implementation for a specific operation across all loaded providers, or both, and execute a given function for each occurence. This will be used by ossl_method_construct(), but also by information processing functions. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/9356) --- doc/internal/man3/ossl_algorithm_do_all.pod | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 doc/internal/man3/ossl_algorithm_do_all.pod (limited to 'doc') diff --git a/doc/internal/man3/ossl_algorithm_do_all.pod b/doc/internal/man3/ossl_algorithm_do_all.pod new file mode 100644 index 0000000000..6ef85a7259 --- /dev/null +++ b/doc/internal/man3/ossl_algorithm_do_all.pod @@ -0,0 +1,63 @@ +=pod + +=head1 NAME + +ossl_algorithm_do_all - generic algorithm implementation iterator + +=head1 SYNOPSIS + + void ossl_algorithm_do_all(OPENSSL_CTX *libctx, int operation_id, + OSSL_PROVIDER *provider, + void (*fn)(OSSL_PROVIDER *provider, + const OSSL_ALGORITHM *algo, + int no_store, void *data), + void *data) + +=head1 DESCRIPTION + +ossl_algorithm_do_all() looks up every algorithm it can find, given a +library context I, an operation identity I and a +provider I. +I may be NULL to signify that the default library context should +be used. +I may be zero to signify that all kinds of operations +will be looked up. +I may be NULL to signify that all loaded providers will be +queried. + +For each implementation found, the function I is called with the +I for the implementation, the algorithm descriptor I, +the flag I indicating whether the algorithm descriptor may +be remembered or not, and the caller I that was passed to +ossl_algorithm_do_all(). + +=head1 RETURN VALUES + +ossl_algorithm_do_all() doesn't return any value. + +=head1 NOTES + +The function described here are mainly useful for discovery, and +possibly display of what has been discovered, for example an +application that wants to display the loaded providers and what they +may offer, but also for constructors, such as +L. + +=head1 SEE ALSO + +L, L + +=head1 HISTORY + +This functionality was added to OpenSSL 3.0. + +=head1 COPYRIGHT + +Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the Apache License 2.0 (the "License"). You may not use this +file except in compliance with the License. You can obtain a copy in the file +LICENSE in the source distribution or at +L. + +=cut -- cgit v1.2.3