OSSL_SELF_TEST_SET_CALLBACK(3SSL)
β¨ NAME β¨
OSSL_SELF_TEST_set_callback, OSSL_SELF_TEST_get_callback β bestie, these two let you hand OpenSSL 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);
π¦ DESCRIPTION π¦
okay so. Setting and getting, that's the whole vibe here.
You use these to set or get the optional application callback (plus the callback argument that rides along with it) β and that callback is what gets called during self testing. fr fr.
The application callback OSSL_CALLBACK(3) is associated with a OSSL_LIB_CTX. Like, that's its person, that's its context, iykyk.
The application callback function receives info about a running self test, and it may return a result back to the calling self test. So it's not just there to look cute β it can actually talk back. π
If you want the further information on the callback, it's over in openssl-core.h(7). Go read it, bestie.
π RETURN VALUES π
OSSL_SELF_TEST_get_callback() returns the callback and the callback argument that were set via OSSL_SELF_TEST_set_callback() for the given library context ctx.
And here's the moment of truth: those returned parameters will be NULL if OSSL_SELF_TEST_set_callback() has not been called. Nothing set, nothing to get. Periodt.
π SEE ALSO π
β HISTORY β
The functions described here were added in OpenSSL 3.0. Vintage-ish but iconic.
π 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.
ok real talk though β that license clause is not a suggestion, it's a whole boundary. Read it, respect it, slay responsibly π
mwah π that's the whole page, sourced from 4.0.3 dated 2026-09-29, page OSSL_SELF_TEST_SET_CALLBACK(3SSL) β go forth and callback, bestie π«Ά
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms