|
NAMEBIO_set_callback_ex, BIO_get_callback_ex, BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg, BIO_debug_callback, BIO_debug_callback_ex, BIO_callback_fn_ex, BIO_callback_fn - BIO callback functionsSYNOPSIS#include <openssl/bio.h> typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp, size_t len, int argi, long argl, int ret, size_t *processed); void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback); BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b); void BIO_set_callback_arg(BIO *b, char *arg); char *BIO_get_callback_arg(const BIO *b); long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len, int argi, long argl, int ret, size_t *processed); The following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7): typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi, long argl, long ret); void BIO_set_callback(BIO *b, BIO_callback_fn cb); BIO_callback_fn BIO_get_callback(const BIO *b); long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); DESCRIPTIONBIO_set_callback_ex() and BIO_get_callback_ex() set and retrieve the BIO callback. The callback is called during most high-level BIO operations. It can be used for debugging purposes to trace operations on a BIO or to modify its operation.BIO_set_callback() and BIO_get_callback() set and retrieve the old format BIO callback. New code should not use these functions, but they are retained for backwards compatibility. Any callback set via BIO_set_callback_ex() will get called in preference to any set by BIO_set_callback(). BIO_set_callback_arg() and BIO_get_callback_arg() are macros which can be used to set and retrieve an argument for use in the callback. BIO_debug_callback_ex() is a standard debugging callback which prints out information relating to each BIO operation. If the callback argument is set it is interpreted as a BIO to send the information to, otherwise stderr is used. The BIO_debug_callback() function is the deprecated version of the same callback for use with the old callback format BIO_set_callback() function. BIO_callback_fn_ex is the type of the callback function and BIO_callback_fn is the type of the old format callback function. The meaning of each argument is described below:
The callback should normally simply return ret when it has finished processing, unless it specifically wishes to modify the value returned to the application. CALLBACK OPERATIONSIn the notes below, callback defers to the actual callback function that is called.
RETURN VALUESBIO_get_callback_ex() and BIO_get_callback() return the callback function previously set by a call to BIO_set_callback_ex() and BIO_set_callback() respectively.BIO_get_callback_arg() returns a char pointer to the value previously set via a call to BIO_set_callback_arg(). BIO_debug_callback() returns 1 or ret if it's called after specific BIO operations. EXAMPLESThe BIO_debug_callback_ex() function is an example, its source is in crypto/bio/bio_cb.cHISTORYThe BIO_debug_callback_ex() function was added in OpenSSL 3.0.BIO_set_callback(), BIO_get_callback(), and BIO_debug_callback() were deprecated in OpenSSL 3.0. Use the non-deprecated _ex functions instead. COPYRIGHTCopyright 2000-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>.
Visit the GSP FreeBSD Man Page Interface. |