openssl-prebuild/linux_amd64/ssl/share/doc/openssl/html/man7/bio.html
2020-03-02 16:50:34 +00:00

113 lines
4.0 KiB
HTML
Executable File

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>bio</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>bio - Basic I/O abstraction</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
#include &lt;openssl/bio.h&gt;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>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.</p>
<p>There are two type of BIO, a source/sink BIO and a filter BIO.</p>
<p>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.</p>
<p>A filter BIO takes data from one BIO and passes it through to
another, or the application. The data may be left unmodified (for
example a message 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.</p>
<p>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).</p>
<p>Some BIOs (such as memory BIOs) can be used immediately after calling
<code>BIO_new()</code>. Others (such as file BIOs) need some additional initialization,
and frequently a utility function exists to create and initialize such BIOs.</p>
<p>If <code>BIO_free()</code> is called on a BIO chain it will only free one BIO resulting
in a memory leak.</p>
<p>Calling <code>BIO_free_all()</code> on a single BIO has the same effect as calling
<code>BIO_free()</code> on it other than the discarded return value.</p>
<p>Normally the <em>type</em> argument is supplied by a function which returns a
pointer to a BIO_METHOD. There is a naming convention for such functions:
a source/sink BIO typically starts with <em>BIO_s_</em> and
a filter BIO with <em>BIO_f_</em>.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>Create a memory BIO:</p>
<pre>
BIO *mem = BIO_new(BIO_s_mem());</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>BIO_ctrl(3)</em>,
<em>BIO_f_base64(3)</em>, <em>BIO_f_buffer(3)</em>,
<em>BIO_f_cipher(3)</em>, <em>BIO_f_md(3)</em>,
<em>BIO_f_null(3)</em>, <em>BIO_f_ssl(3)</em>,
<em>BIO_find_type(3)</em>, <em>BIO_new(3)</em>,
<em>BIO_new_bio_pair(3)</em>,
<em>BIO_push(3)</em>, <em>BIO_read_ex(3)</em>,
<em>BIO_s_accept(3)</em>, <em>BIO_s_bio(3)</em>,
<em>BIO_s_connect(3)</em>, <em>BIO_s_fd(3)</em>,
<em>BIO_s_file(3)</em>, <em>BIO_s_mem(3)</em>,
<em>BIO_s_null(3)</em>, <em>BIO_s_socket(3)</em>,
<em>BIO_set_callback(3)</em>,
<em>BIO_should_retry(3)</em></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the Apache License 2.0 (the &quot;License&quot;). 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
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
</body>
</html>