OSSL_SELF_TEST_SET_CALLBACK(3ossl)
π OSSL_SELF_TEST_SET_CALLBACK π
okay so bestie, welcome to the 3ossl girlies' corner of the OpenSSL manual β yes this is the OpenSSL docs, and yes we're about to make self-test callbacks make sense. strap in π
β¨ NAME β¨
OSSL_SELF_TEST_set_callback, OSSL_SELF_TEST_get_callback β these two are literally the "hey bestie, here's a callback for processing self tests" functions. one sets it, one gets it. iconic duo fr fr π«Ά
πΈ 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, copy-paste that include and you're in business π
π¦ DESCRIPTION π¦
so basically these two set or get the optional application callback (plus the callback argument, cbarg) that gets called while self testing is happening. the way it works is the application callback OSSL_CALLBACK(3) is associated with an 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. that's the whole vibe. if you want the full lore on the callback itself, go read openssl-core.h(7) β it's giving required reading, ngl π
β RETURN VALUES β
OSSL_SELF_TEST_get_callback() hands you back the callback and the callback argument that were set via OSSL_SELF_TEST_set_callback() for the given library context ctx. π
heads up: those returned parameters will beNULLifOSSL_SELF_TEST_set_callback()has not been called. so if you're seeingNULLs, it's not a bug, it's just nobody set anything yet. no cap π
π SEE ALSO π
go touch grass in these other pages, they're all linked besties:
π HISTORY π
these functions described here were added in OpenSSL 3.0. so they're not ancient, they're fresh β¨
π 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>.
and that's the whole page, bestie π this was OpenSSL 3.5.0, dated 2026-09-25 β mwah, go forth and callback responsibly π§π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms