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