OSSL_DISPATCH.pod 2.2 KB

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