BIO

From OpenSSLWiki
Revision as of 18:22, 3 March 2013 by Ppelleti (talk | contribs) (copied the content that I wrote about BIOs from the OpenSSL wikibook)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

A BIO is an I/O stream abstraction; essentially OpenSSL's answer to the C library's FILE *. OpenSSL comes with a number of useful BIO types predefined, or you can create your own.

BIOs come in two flavors: source/sink, or filter. BIOs can be chained together. Each chain always has exactly one source/sink, but can have any number (zero or more) of filters.

Reading from a BIO can be done with BIO_read and BIO_gets.

Writing to a BIO can be done with BIO_write, BIO_puts, BIO_printf, and BIO_vprintf.

Filter BIOs

Source/sink BIOs