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