summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-06 12:54:19 +0000
committerschwarze <>2016-12-06 12:54:19 +0000
commit3472b6f5a290febbe7727d2886dce3ddeb0798e4 (patch)
treeff8829e73684df79b569988da2fa0850acaa867f
parenteea7454d5f0937c3ffb6642ac5b1ba135b172e29 (diff)
downloadopenbsd-3472b6f5a290febbe7727d2886dce3ddeb0798e4.tar.gz
openbsd-3472b6f5a290febbe7727d2886dce3ddeb0798e4.tar.bz2
openbsd-3472b6f5a290febbe7727d2886dce3ddeb0798e4.zip
We don't want section 3 manual pages with names that do not correspond
to functions, so delete the BIO(3) manual page and merge its content into BIO_new(3) and BIO_push(3). Sort the content of BIO_new(3) into a logical order and improve the wording in various ways. Add the required cross references to BIO_push(3).
-rw-r--r--src/lib/libcrypto/man/BIO.3105
-rw-r--r--src/lib/libcrypto/man/BIO_new.3131
-rw-r--r--src/lib/libcrypto/man/BIO_push.323
-rw-r--r--src/lib/libcrypto/man/Makefile3
4 files changed, 108 insertions, 154 deletions
diff --git a/src/lib/libcrypto/man/BIO.3 b/src/lib/libcrypto/man/BIO.3
deleted file mode 100644
index 3c2dd8cbe5..0000000000
--- a/src/lib/libcrypto/man/BIO.3
+++ /dev/null
@@ -1,105 +0,0 @@
1.\" $OpenBSD: BIO.3,v 1.5 2016/11/22 14:55:19 schwarze Exp $
2.\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2000 The OpenSSL Project. All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\"
11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer.
13.\"
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in
16.\" the documentation and/or other materials provided with the
17.\" distribution.
18.\"
19.\" 3. All advertising materials mentioning features or use of this
20.\" software must display the following acknowledgment:
21.\" "This product includes software developed by the OpenSSL Project
22.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23.\"
24.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25.\" endorse or promote products derived from this software without
26.\" prior written permission. For written permission, please contact
27.\" openssl-core@openssl.org.
28.\"
29.\" 5. Products derived from this software may not be called "OpenSSL"
30.\" nor may "OpenSSL" appear in their names without prior written
31.\" permission of the OpenSSL Project.
32.\"
33.\" 6. Redistributions of any form whatsoever must retain the following
34.\" acknowledgment:
35.\" "This product includes software developed by the OpenSSL Project
36.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37.\"
38.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
42.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\"
51.Dd $Mdocdate: November 22 2016 $
52.Dt BIO 3
53.Os
54.Sh NAME
55.Nm BIO
56.Nd OpenSSL basic I/O abstraction
57.Sh SYNOPSIS
58.In openssl/bio.h
59.Sh DESCRIPTION
60A BIO is an I/O abstraction,
61hiding many of the underlying I/O details from an application.
62If an application uses a BIO for its I/O, it can transparently handle
63SSL connections, unencrypted network connections and file I/O.
64.Pp
65There are two types of BIO, a source/sink BIO and a filter BIO.
66.Pp
67As its name implies, a source/sink BIO is a source and/or sink of data.
68Examples include a socket BIO and a file BIO.
69.Pp
70A filter BIO takes data from one BIO and passes it through
71to another, or to the application.
72The data may be left unmodified (for example a message digest BIO)
73or translated (for example an encryption BIO).
74The effect of a filter BIO may change according to the I/O operation
75it is performing: for example an encryption BIO will encrypt data
76if it is being written to and decrypt data if it is being read from.
77.Pp
78BIOs can be joined together to form a chain
79(a single BIO is a chain with one component).
80A chain normally consist of one source/sink BIO
81and one or more filter BIOs.
82Data read from or written to the first BIO then traverses the chain
83to the end (normally a source/sink BIO).
84.Sh SEE ALSO
85.Xr BIO_ctrl 3 ,
86.Xr BIO_f_base64 3 ,
87.Xr BIO_f_buffer 3 ,
88.Xr BIO_f_cipher 3 ,
89.Xr BIO_f_md 3 ,
90.Xr BIO_f_null 3 ,
91.Xr BIO_f_ssl 3 ,
92.Xr BIO_find_type 3 ,
93.Xr BIO_new 3 ,
94.Xr BIO_push 3 ,
95.Xr BIO_read 3 ,
96.Xr BIO_s_accept 3 ,
97.Xr BIO_s_bio 3 ,
98.Xr BIO_s_connect 3 ,
99.Xr BIO_s_fd 3 ,
100.Xr BIO_s_file 3 ,
101.Xr BIO_s_mem 3 ,
102.Xr BIO_s_null 3 ,
103.Xr BIO_s_socket 3 ,
104.Xr BIO_set_callback 3 ,
105.Xr BIO_should_retry 3
diff --git a/src/lib/libcrypto/man/BIO_new.3 b/src/lib/libcrypto/man/BIO_new.3
index 59a5b37056..654f4e844a 100644
--- a/src/lib/libcrypto/man/BIO_new.3
+++ b/src/lib/libcrypto/man/BIO_new.3
@@ -1,5 +1,6 @@
1.\" $OpenBSD: BIO_new.3,v 1.5 2016/11/18 18:43:05 schwarze Exp $ 1.\" $OpenBSD: BIO_new.3,v 1.6 2016/12/06 12:54:19 schwarze Exp $
2.\" OpenSSL ca3a82c3 Mar 25 11:31:18 2015 -0400 2.\" OpenSSL doc/man3/BIO_new.pod ca3a82c3 Mar 25 11:31:18 2015 -0400
3.\" OpenSSL doc/man7/bio.pod a9c85cea Nov 11 09:33:55 2016 +0100
3.\" 4.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 5.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2000, 2015, 2016 The OpenSSL Project. All rights reserved. 6.\" Copyright (c) 2000, 2015, 2016 The OpenSSL Project. All rights reserved.
@@ -48,7 +49,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 51.\"
51.Dd $Mdocdate: November 18 2016 $ 52.Dd $Mdocdate: December 6 2016 $
52.Dt BIO_NEW 3 53.Dt BIO_NEW 3
53.Os 54.Os
54.Sh NAME 55.Sh NAME
@@ -57,7 +58,7 @@
57.Nm BIO_free , 58.Nm BIO_free ,
58.Nm BIO_vfree , 59.Nm BIO_vfree ,
59.Nm BIO_free_all 60.Nm BIO_free_all
60.Nd BIO allocation and freeing functions 61.Nd construct and destruct I/O abstraction objects
61.Sh SYNOPSIS 62.Sh SYNOPSIS
62.In openssl/bio.h 63.In openssl/bio.h
63.Ft BIO * 64.Ft BIO *
@@ -82,78 +83,124 @@
82.Fa "BIO *a" 83.Fa "BIO *a"
83.Fc 84.Fc
84.Sh DESCRIPTION 85.Sh DESCRIPTION
86A
87.Vt BIO
88is an I/O abstraction object, hiding many of the underlying I/O
89details from an application.
90If an application uses BIOs for its I/O, it can transparently handle
91SSL connections, unencrypted network connections, and file I/O.
92.Pp
85The 93The
86.Fn BIO_new 94.Fn BIO_new
87function returns a new BIO using method 95function constructs a new
96.Vt BIO
97using the method
88.Fa type . 98.Fa type .
99There are two groups of BIO types, source/sink BIOs and a filter BIOs.
100.Pp
101Source/sink BIOs provide input or consume output.
102Examples include socket BIOs and file BIOs.
103.Pp
104Filter BIOs take data from one BIO and pass it through to another,
105or to the application, forming a chain of BIOs.
106The data may be left unmodified (for example by a message digest BIO)
107or translated (for example by an encryption BIO).
108The effect of a filter BIO may change according to the I/O operation
109it is performing: for example an encryption BIO will encrypt data
110if it is written to and decrypt data if it is read from.
111.Pp
112Some BIOs (such as memory BIOs) can be used immediately after calling
113.Fn BIO_new .
114Others (such as file BIOs) need some additional initialization, and
115utility functions exists to construct and initialize such BIOs.
116.Pp
117Normally the
118.Fa type
119argument is supplied by a function which returns a pointer to a
120.Vt BIO_METHOD .
121There is a naming convention for such functions:
122the methods for source/sink BIOs are called
123.Fn BIO_s_*
124and those for filter BIOs
125.Fn BIO_f_* .
89.Pp 126.Pp
90.Fn BIO_set 127.Fn BIO_set
91sets the method of an already existing BIO. 128sets the method of an already existing BIO.
92.Pp 129.Pp
93.Fn BIO_free 130.Fn BIO_free
94frees up a single BIO; 131and
95.Fn BIO_vfree 132.Fn BIO_vfree
96also frees up a single BIO, but it does not return a value. 133destruct a single BIO, which may also have some effect on the
134underlying I/O structure, for example it may close the file being
135referred to under certain circumstances.
97If 136If
98.Fa a 137.Fa a
99is a 138is a
100.Dv NULL 139.Dv NULL
101pointer, no action occurs. 140pointer, no action occurs.
102Calling 141If
103.Fn BIO_free 142.Fn BIO_free
104may also have some effect on the underlying I/O structure, 143is called on a BIO chain, it will only destruct one BIO,
105for example it may close the file being 144resulting in a memory leak.
106referred to under certain circumstances.
107For more details see the individual
108.Vt BIO_METHOD
109descriptions.
110.Pp 145.Pp
111.Fn BIO_free_all 146.Fn BIO_free_all
112frees up an entire BIO chain. 147destructs an entire BIO chain.
113It does not halt if an error occurs 148It does not halt if an error occurs
114freeing up an individual BIO in the chain. 149destructing an individual BIO in the chain.
115If 150If
116.Fa a 151.Fa a
117is a 152is a
118.Dv NULL 153.Dv NULL
119pointer, no action occurs. 154pointer, no action occurs.
120.Pp
121Some BIOs (such as memory BIOs) can be used immediately after calling
122.Fn BIO_new .
123Others (such as file BIOs) need some additional initialization, and
124frequently a utility function exists to create and initialize such BIOs.
125.Pp
126If
127.Fn BIO_free
128is called on a BIO chain, it will only free one BIO,
129resulting in a memory leak.
130.Pp
131Calling 155Calling
132.Fn BIO_free_all 156.Fn BIO_free_all
133on a single BIO has the same effect as calling 157on a single BIO has the same effect as
134.Fn BIO_free 158.Fn BIO_vfree .
135on it other than the discarded return value.
136.Pp 159.Pp
137Normally the 160Common I/O functions are documented in
138.Fa type 161.Xr BIO_read 3 .
139argument is supplied by a function which returns a pointer to a 162Forming chains is explained in
140.Vt BIO_METHOD . 163.Xr BIO_push 3 ,
141There is a naming convention for such functions: 164inspecting them in
142a source/sink BIO is normally called 165.Xr BIO_find_type 3 .
143.Fn BIO_s_* 166For more details about the different kinds of BIOs, see the individual
144and a filter BIO 167.Vt BIO_METHOD
145.Fn BIO_f_* . 168manual pages.
146.Sh RETURN VALUES 169.Sh RETURN VALUES
147.Fn BIO_new 170.Fn BIO_new
148returns a newly created BIO or 171returns a newly constructed
172.Vt BIO
173object or
149.Dv NULL 174.Dv NULL
150if the call fails. 175on failure.
151.Pp 176.Pp
152.Fn BIO_set 177.Fn BIO_set
153and 178and
154.Fn BIO_free 179.Fn BIO_free
155return 1 for success and 0 for failure. 180return 1 for success or 0 for failure.
156.Sh EXAMPLES 181.Sh EXAMPLES
157Create a memory BIO: 182Create a memory BIO:
158.Pp 183.Pp
159.Dl BIO *mem = BIO_new(BIO_s_mem()); 184.Dl BIO *mem = BIO_new(BIO_s_mem());
185.Sh SEE ALSO
186.Xr BIO_ctrl 3 ,
187.Xr BIO_f_base64 3 ,
188.Xr BIO_f_buffer 3 ,
189.Xr BIO_f_cipher 3 ,
190.Xr BIO_f_md 3 ,
191.Xr BIO_f_null 3 ,
192.Xr BIO_f_ssl 3 ,
193.Xr BIO_get_ex_new_index.3 ,
194.Xr BIO_find_type 3 ,
195.Xr BIO_push 3 ,
196.Xr BIO_read 3 ,
197.Xr BIO_s_accept 3 ,
198.Xr BIO_s_bio 3 ,
199.Xr BIO_s_connect 3 ,
200.Xr BIO_s_fd 3 ,
201.Xr BIO_s_file 3 ,
202.Xr BIO_s_mem 3 ,
203.Xr BIO_s_null 3 ,
204.Xr BIO_s_socket 3 ,
205.Xr BIO_set_callback 3 ,
206.Xr BIO_should_retry 3
diff --git a/src/lib/libcrypto/man/BIO_push.3 b/src/lib/libcrypto/man/BIO_push.3
index 42afc7659a..5b9e94123f 100644
--- a/src/lib/libcrypto/man/BIO_push.3
+++ b/src/lib/libcrypto/man/BIO_push.3
@@ -1,5 +1,6 @@
1.\" $OpenBSD: BIO_push.3,v 1.4 2016/11/18 18:52:11 schwarze Exp $ 1.\" $OpenBSD: BIO_push.3,v 1.5 2016/12/06 12:54:19 schwarze Exp $
2.\" OpenSSL 76ed5a42 Jun 29 13:38:55 2014 +0100 2.\" OpenSSL doc/man3/BIO_push.pod 76ed5a42 Jun 29 13:38:55 2014 +0100
3.\" OpenSSL doc/man7/bio.pod a9c85cea Nov 11 09:33:55 2016 +0100
3.\" 4.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 5.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2000, 2014 The OpenSSL Project. All rights reserved. 6.\" Copyright (c) 2000, 2014 The OpenSSL Project. All rights reserved.
@@ -48,7 +49,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 51.\"
51.Dd $Mdocdate: November 18 2016 $ 52.Dd $Mdocdate: December 6 2016 $
52.Dt BIO_PUSH 3 53.Dt BIO_PUSH 3
53.Os 54.Os
54.Sh NAME 55.Sh NAME
@@ -67,6 +68,13 @@
67.Fa "BIO *b" 68.Fa "BIO *b"
68.Fc 69.Fc
69.Sh DESCRIPTION 70.Sh DESCRIPTION
71BIOs can be joined together to form chains.
72A chain normally consist of one or more filter BIOs
73and one source/sink BIO at the end.
74Data read from or written to the first BIO traverses the chain
75to the end.
76A single BIO can be regarded as a chain with one component.
77.Pp
70The 78The
71.Fn BIO_push 79.Fn BIO_push
72function appends the BIO 80function appends the BIO
@@ -97,8 +105,9 @@ The process of calling
97.Fn BIO_push 105.Fn BIO_push
98and 106and
99.Fn BIO_pop 107.Fn BIO_pop
100on a BIO may have additional consequences: 108on a BIO may have additional consequences: a
101a control call is made to the affected BIOs. 109.Xr BIO_ctrl 3
110call is made to the affected BIOs.
102Any effects will be noted in the descriptions of individual BIOs. 111Any effects will be noted in the descriptions of individual BIOs.
103.Sh RETURN VALUES 112.Sh RETURN VALUES
104.Fn BIO_push 113.Fn BIO_push
@@ -163,3 +172,7 @@ and the new chain will be
163data can be written to 172data can be written to
164.Sy md1 173.Sy md1
165as before. 174as before.
175.Sh SEE ALSO
176.Xr BIO_find_type 3 ,
177.Xr BIO_new 3 ,
178.Xr BIO_read 3
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 29e066614f..3878d948e1 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.67 2016/12/05 20:30:12 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.68 2016/12/06 12:54:19 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -12,7 +12,6 @@ MAN= \
12 ASN1_generate_nconf.3 \ 12 ASN1_generate_nconf.3 \
13 ASN1_time_parse.3 \ 13 ASN1_time_parse.3 \
14 BF_set_key.3 \ 14 BF_set_key.3 \
15 BIO.3 \
16 BIO_ctrl.3 \ 15 BIO_ctrl.3 \
17 BIO_f_base64.3 \ 16 BIO_f_base64.3 \
18 BIO_f_buffer.3 \ 17 BIO_f_buffer.3 \