DragonFly On-Line Manual Pages

Search: Section:  


BIO(3)		      DragonFly Library Functions Manual		BIO(3)

NAME

BIO -- I/O abstraction

SYNOPSIS

#include <openssl/bio.h>

DESCRIPTION

A BIO is an I/O abstraction, it hides many of the underlying I/O details from an application. If an application uses a BIO for its I/O, it can transparently handle SSL connections, unencrypted network connections and file I/O. There are two types of BIO, a source/sink BIO and a filter BIO. As its name implies, a source/sink BIO is a source and/or sink of data, examples include a socket BIO and a file BIO. A filter BIO takes data from one BIO and passes it through to another, or to the application. The data may be left unmodified (for example a mes- sage digest BIO) or translated (for example an encryption BIO). The effect of a filter BIO may change according to the I/O operation it is performing: for example an encryption BIO will encrypt data if it is being written to and decrypt data if it is being read from. BIOs can be joined together to form a chain (a single BIO is a chain with one component). A chain normally consist of one source/sink BIO and one or more filter BIOs. Data read from or written to the first BIO then traverses the chain to the end (normally a source/sink BIO).

SEE ALSO

BIO_ctrl(3), BIO_f_base64(3), BIO_f_buffer(3), BIO_f_cipher(3), BIO_f_md(3), BIO_f_null(3), BIO_f_ssl(3), BIO_find_type(3), BIO_new(3), BIO_new_bio_pair(3), BIO_push(3), BIO_read(3), BIO_s_accept(3), BIO_s_bio(3), BIO_s_connect(3), BIO_s_fd(3), BIO_s_file(3), BIO_s_mem(3), BIO_s_null(3), BIO_s_socket(3), BIO_set_callback(3), BIO_should_retry(3) DragonFly 4.7 July 17, 2014 DragonFly 4.7 BIO_GET_DATA(3) DragonFly Library Functions Manual BIO_GET_DATA(3)

NAME

BIO_set_data, BIO_get_data, BIO_set_init, BIO_set_shutdown, BIO_get_shutdown -- manage BIO state information

SYNOPSIS

#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);

DESCRIPTION

These functions are mainly useful when implementing a custom BIO. The BIO_set_data() function associates the custom data pointed to by ptr with the BIO a. This data can subsequently be retrieved via a call to BIO_get_data(). This can be used by custom BIOs for storing implementa- tion specific information. The BIO_set_init() 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, initiali- sation may not be complete until additional steps have been taken, for example through calling custom ctrls. The BIO_set_shutdown() and BIO_get_shutdown() functions are low-level interfaces to forcefully set and get the shutdown flag of a, circumvent- ing 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.

RETURN VALUES

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).

SEE ALSO

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

HISTORY

These functions first appeared in OpenSSL 1.1.0 and have been available since OpenBSD 6.3. DragonFly 5.5 March 23, 2018 DragonFly 5.5

Search: Section: