OSSL_SELF_TEST_SET_CALLBACK(3ossl)
π OSSL_SELF_TEST_SET_CALLBACK π
okay so bestie, welcome to the OpenSSL self-test callback page, aka the place where you get to be nosy about what your crypto library is doing while it's checking itself. this is OSSL_SELF_TEST_set_callback and OSSL_SELF_TEST_get_callback, from the OpenSSL manual (section 3ossl), and we're gonna go through the whole thing together, no skips, no shortcuts, periodt. π
β¨ NAME β¨
OSSL_SELF_TEST_set_callback, OSSL_SELF_TEST_get_callback β specify a callback for processing self tests π¦
πΈ SYNOPSIS πΈ
#include <openssl/self_test.h>
void OSSL_SELF_TEST_set_callback(OSSL_LIB_CTX *ctx, OSSL_CALLBACK *cb, void *cbarg);
void OSSL_SELF_TEST_get_callback(OSSL_LIB_CTX *ctx, OSSL_CALLBACK **cb, void **cbarg);
like look at those signatures, they're giving clean, they're giving minimal, they're giving we set a thing and we get a thing. iconic behavior honestly. π
π DESCRIPTION π
so what are we even doing here. you're either setting or getting the optional application callback β plus that callback's argument, cbarg β that gets called during self testing. that's it, that's the whole vibe.
the application callback is OSSL_CALLBACK(3), and it's associated with a OSSL_LIB_CTX. π«Ά
and what does that callback actually do? it receives information about a running self test, and it may return a result to the calling self test. so you're basically the group chat getting live updates from the self test, and you're allowed to text back. see openssl-core.h(7) for further information on the callback β that's where the deets live, iykyk.
β RETURN VALUES β
okay so OSSL_SELF_TEST_get_callback() returns the callback and callback argument that has been set via OSSL_SELF_TEST_set_callback() for the given library context ctx.
and here's the important bit, bestie, don't miss it: these returned parameters will be NULL if OSSL_SELF_TEST_set_callback() has not been called. so if you get nothing back, it's not a bug, it's justβ¦ nobody set anything. π
π SEE ALSO π
go read those too, they're all part of the lore. πβ¨
π¦ HISTORY π¦
the functions described here were added in OpenSSL 3.0. so if you're on something older, this is not your era, sorry. π
π COPYRIGHT π
Copyright 2019-2021 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>.
fr fr read the license, it's not optional, it's the rules. π
and that's the whole page, bestie, you ate it. π this was OpenSSL 3.5.9, dated 2026-09-29, and yes those are the version and date from the footer, we're not skipping the fine print in this house. mwah, go forth and self-test responsibly. ππ§π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms