OSSL_DISPATCH(3ossl)
π NAME π β OSSL_DISPATCH(3ossl)
OSSL_DISPATCH and OSSL_DISPATCH_END are the OpenSSL Core type for defining a dispatchable function table, bestie. Yes, this is the OSSL_DISPATCH(3ossl) page, and we're gonna get into it. β¨
πΈ SYNOPSIS πΈ
#include <openssl/core.h>
typedef struct ossl_dispatch_st OSSL_DISPATCH;
struct ossl_dispatch_st {
int function_id;
void (*function)(void);
};
#define OSSL_DISPATCH_END
π¦ DESCRIPTION π¦
This type is literally a tuple of function identity and function pointer. Arrays of this type get passed between the OpenSSL libraries and the providers to describe what functionality one side provides to the other. It's giving "here's my little menu of abilities" and honestly that's iconic. π
Arrays of this type must be terminated with the OSSL_DISPATCH_END macro. No cap.
π¨ bestie warning: do not forget the OSSL_DISPATCH_END terminator. That ending is not optional.
π OSSL_DISPATCH fields π
function_idβ the OpenSSL defined function identity of the implemented function. This is the label that says what this function is.functionβ a pointer to the implemented function itself. Even though this field has a generic definition, the implemented function it points to must have a function signature that corresponds to thefunction_id. Fr fr, the vibe has to match.
Available function identities and corresponding function signatures are defined in openssl-core_dispatch.h(7). Also, the chosen function identities and associated function signature must be chosen specifically for the operation that it's intended for, as determined by the intended OSSL_ALGORITHM(3) array.
Any function identity not recognised by the recipient of this type will be ignored. That's the whole slay: it ensures that providers built with one OpenSSL version in mind will work together with any other OpenSSL version that supports this mechanism. π«Ά
π SEE ALSO π
π°οΈ HISTORY π°οΈ
OSSL_DISPATCH was added in OpenSSL 3.0.
π COPYRIGHT π
Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page, bestie. this was OpenSSL 3.5.6, dated 2026-04-07, signed OSSL_DISPATCH(3ossl) β mwah πππ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms