Add internal function ossl_algorithm_do_all()
[openssl.git] / doc / internal / man3 / ossl_algorithm_do_all.pod
1 =pod
2
3 =head1 NAME
4
5 ossl_algorithm_do_all - generic algorithm implementation iterator
6
7 =head1 SYNOPSIS
8
9  void ossl_algorithm_do_all(OPENSSL_CTX *libctx, int operation_id,
10                             OSSL_PROVIDER *provider,
11                             void (*fn)(OSSL_PROVIDER *provider,
12                                        const OSSL_ALGORITHM *algo,
13                                        int no_store, void *data),
14                             void *data)
15
16 =head1 DESCRIPTION
17
18 ossl_algorithm_do_all() looks up every algorithm it can find, given a
19 library context I<libctx>, an operation identity I<operation_id> and a
20 provider I<provider>.
21 I<libctx> may be NULL to signify that the default library context should
22 be used.
23 I<operation_id> may be zero to signify that all kinds of operations
24 will be looked up.
25 I<provider> may be NULL to signify that all loaded providers will be
26 queried.
27
28 For each implementation found, the function I<fn> is called with the
29 I<provider> for the implementation, the algorithm descriptor I<algo>,
30 the flag I<no_store> indicating whether the algorithm descriptor may
31 be remembered or not, and the caller I<data> that was passed to
32 ossl_algorithm_do_all().
33
34 =head1 RETURN VALUES
35
36 ossl_algorithm_do_all() doesn't return any value.
37
38 =head1 NOTES
39
40 The function described here are mainly useful for discovery, and
41 possibly display of what has been discovered, for example an
42 application that wants to display the loaded providers and what they
43 may offer, but also for constructors, such as
44 L<ossl_construct_method(3)>.
45
46 =head1 SEE ALSO
47
48 L<ossl_construct_method(3)>, L<EVP_MAC_do_all(3)>
49
50 =head1 HISTORY
51
52 This functionality was added to OpenSSL 3.0.
53
54 =head1 COPYRIGHT
55
56 Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
57
58 Licensed under the Apache License 2.0 (the "License").  You may not use this
59 file except in compliance with the License.  You can obtain a copy in the file
60 LICENSE in the source distribution or at
61 L<https://www.openssl.org/source/license.html>.
62
63 =cut