OpenBSD manual page server

Manual Page Search Parameters

BIO_GET_DATA(3) Library Functions Manual BIO_GET_DATA(3)

BIO_set_data, BIO_get_data, BIO_set_init, BIO_set_shutdown, BIO_get_shutdownmanage BIO state information

#include <openssl/bio.h>

void
BIO_set_data(BIO *a, void *ptr);

void *
BIO_get_data(BIO *a);

void
BIO_set_init(BIO *a, int init);

void
BIO_set_shutdown(BIO *a, int shutdown);

int
BIO_get_shutdown(BIO *a);

These functions are mainly useful when implementing a custom BIO.

The () function associates the custom data pointed to by ptr with the BIO a. This data can subsequently be retrieved via a call to (). This can be used by custom BIOs for storing implementation specific information.

The () function sets the init flag in a to the specified value. A non-zero value indicates that initialisation is complete, whilst zero indicates that it is not. Often initialisation will complete during initial construction of the BIO. For some BIOs however, initialisation may not be complete until additional steps have been taken, for example through calling custom ctrls.

The () and () functions are low-level interfaces to forcefully set and get the shutdown flag of a, circumventing type-dependent sanity checks, exclusively intended for implementing a new BIO type. The shutdown argument must be either BIO_CLOSE or BIO_NOCLOSE. When merely using a BIO object, call BIO_set_close(3) and BIO_get_close(3) instead.

BIO_get_data() returns a pointer to the implementation specific custom data associated with a, or NULL if none is set.

BIO_get_shutdown() returns the value previously set with BIO_set_shutdown() or with BIO_set_close(3).

BIO_meth_new(3), BIO_new(3), BIO_set_close(3)

These functions first appeared in OpenSSL 1.1.0 and have been available since OpenBSD 6.3.

March 23, 2018 OpenBSD-7.1