Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
BIO_push, BIO_pop, BIO_set_next — manipulate BIO chainsSYNOPSIS
#include <openssl/bio.h>BIO_push(BIO *b, BIO *new_tail);
BIO_pop(BIO *b);
BIO_set_next(BIO *b, BIO *new_tail);
DESCRIPTION
BIOs can be joined together to form chains. A chain normally consists of one or more filter BIOs and one source/sink BIO at the end. Data read from or written to the first BIO traverses the chain to the end.RETURN VALUES
BIO_push() returns b for success or a different pointer for failure. In particular, it fails and returns new_tail if b is NULL. In LibreSSL, it fails and returns NULL if appending would create a cycle.EXAMPLES
For these examples suppose md1 and md2 are digest BIOs, b64 is a Base64 BIO and f is a file BIO (see BIO_f_md(3), BIO_f_base64(3), and BIO_s_file(3), respectively).BIO_push(b64, f);
BIO_push(md2, b64); BIO_push(md1, md2);
BIO_pop(md2);
if (b == NULL || new_tail == NULL || b == new_tail) /* Report the problem and bail out. */ if (BIO_push(b, new_tail) != b) /* Report that nothing was changed * because it would have created a cycle. */