1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery 3*b077aed3SPierre Pronchery=head1 NAME 4*b077aed3SPierre Pronchery 5*b077aed3SPierre ProncheryOSSL_DISPATCH - OpenSSL Core type to define a dispatchable function table 6*b077aed3SPierre Pronchery 7*b077aed3SPierre Pronchery=head1 SYNOPSIS 8*b077aed3SPierre Pronchery 9*b077aed3SPierre Pronchery #include <openssl/core.h> 10*b077aed3SPierre Pronchery 11*b077aed3SPierre Pronchery typedef struct ossl_dispatch_st OSSL_DISPATCH; 12*b077aed3SPierre Pronchery struct ossl_dispatch_st { 13*b077aed3SPierre Pronchery int function_id; 14*b077aed3SPierre Pronchery void (*function)(void); 15*b077aed3SPierre Pronchery }; 16*b077aed3SPierre Pronchery 17*b077aed3SPierre Pronchery=head1 DESCRIPTION 18*b077aed3SPierre Pronchery 19*b077aed3SPierre ProncheryThis type is a tuple of function identity and function pointer. 20*b077aed3SPierre ProncheryArrays of this type are passed between the OpenSSL libraries and the 21*b077aed3SPierre Proncheryproviders to describe what functionality one side provides to the other. 22*b077aed3SPierre Pronchery 23*b077aed3SPierre ProncheryArrays of this type must be terminated with a tuple having function identity 24*b077aed3SPierre Proncheryzero and function pointer NULL. 25*b077aed3SPierre Pronchery 26*b077aed3SPierre Pronchery=head2 B<OSSL_DISPATCH> fields 27*b077aed3SPierre Pronchery 28*b077aed3SPierre Pronchery=over 4 29*b077aed3SPierre Pronchery 30*b077aed3SPierre Pronchery=item I<function_id> 31*b077aed3SPierre Pronchery 32*b077aed3SPierre ProncheryOpenSSL defined function identity of the implemented function. 33*b077aed3SPierre Pronchery 34*b077aed3SPierre Pronchery=item I<function> 35*b077aed3SPierre Pronchery 36*b077aed3SPierre ProncheryPointer to the implemented function itself. Despite the generic definition 37*b077aed3SPierre Proncheryof this field, the implemented function it points to must have a function 38*b077aed3SPierre Proncherysignature that corresponds to the I<function_id> 39*b077aed3SPierre Pronchery 40*b077aed3SPierre Pronchery=back 41*b077aed3SPierre Pronchery 42*b077aed3SPierre ProncheryAvailable function identities and corresponding function signatures are 43*b077aed3SPierre Proncherydefined in L<openssl-core_dispatch.h(7)>. 44*b077aed3SPierre ProncheryFurthermore, the chosen function identities and associated function 45*b077aed3SPierre Proncherysignature must be chosen specifically for the operation that it's intended 46*b077aed3SPierre Proncheryfor, as determined by the intended L<OSSL_ALGORITHM(3)> array. 47*b077aed3SPierre Pronchery 48*b077aed3SPierre ProncheryAny function identity not recognised by the recipient of this type 49*b077aed3SPierre Proncherywill be ignored. 50*b077aed3SPierre ProncheryThis ensures that providers built with one OpenSSL version in mind 51*b077aed3SPierre Proncherywill work together with any other OpenSSL version that supports this 52*b077aed3SPierre Proncherymechanism. 53*b077aed3SPierre Pronchery 54*b077aed3SPierre Pronchery=begin comment RETURN VALUES doesn't make sense for a manual that only 55*b077aed3SPierre Proncherydescribes a type, but document checkers still want that section, and 56*b077aed3SPierre Proncheryto have more than just the section title. 57*b077aed3SPierre Pronchery 58*b077aed3SPierre Pronchery=head1 RETURN VALUES 59*b077aed3SPierre Pronchery 60*b077aed3SPierre Proncherytxt 61*b077aed3SPierre Pronchery 62*b077aed3SPierre Pronchery=end comment 63*b077aed3SPierre Pronchery 64*b077aed3SPierre Pronchery=head1 SEE ALSO 65*b077aed3SPierre Pronchery 66*b077aed3SPierre ProncheryL<crypto(7)>, L<openssl-core_dispatch.h(7)>, L<OSSL_ALGORITHM(3)> 67*b077aed3SPierre Pronchery 68*b077aed3SPierre Pronchery=head1 HISTORY 69*b077aed3SPierre Pronchery 70*b077aed3SPierre ProncheryB<OSSL_DISPATCH> was added in OpenSSL 3.0. 71*b077aed3SPierre Pronchery 72*b077aed3SPierre Pronchery=head1 COPYRIGHT 73*b077aed3SPierre Pronchery 74*b077aed3SPierre ProncheryCopyright 2022 The OpenSSL Project Authors. All Rights Reserved. 75*b077aed3SPierre Pronchery 76*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 77*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 78*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 79*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 80*b077aed3SPierre Pronchery 81*b077aed3SPierre Pronchery=cut 82