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