diff options
author | schwarze <> | 2016-12-06 12:54:19 +0000 |
---|---|---|
committer | schwarze <> | 2016-12-06 12:54:19 +0000 |
commit | 3472b6f5a290febbe7727d2886dce3ddeb0798e4 (patch) | |
tree | ff8829e73684df79b569988da2fa0850acaa867f | |
parent | eea7454d5f0937c3ffb6642ac5b1ba135b172e29 (diff) | |
download | openbsd-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.3 | 105 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_new.3 | 131 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_push.3 | 23 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
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 | ||
60 | A BIO is an I/O abstraction, | ||
61 | hiding many of the underlying I/O details from an application. | ||
62 | If an application uses a BIO for its I/O, it can transparently handle | ||
63 | SSL connections, unencrypted network connections and file I/O. | ||
64 | .Pp | ||
65 | There are two types of BIO, a source/sink BIO and a filter BIO. | ||
66 | .Pp | ||
67 | As its name implies, a source/sink BIO is a source and/or sink of data. | ||
68 | Examples include a socket BIO and a file BIO. | ||
69 | .Pp | ||
70 | A filter BIO takes data from one BIO and passes it through | ||
71 | to another, or to the application. | ||
72 | The data may be left unmodified (for example a message digest BIO) | ||
73 | or translated (for example an encryption BIO). | ||
74 | The effect of a filter BIO may change according to the I/O operation | ||
75 | it is performing: for example an encryption BIO will encrypt data | ||
76 | if it is being written to and decrypt data if it is being read from. | ||
77 | .Pp | ||
78 | BIOs can be joined together to form a chain | ||
79 | (a single BIO is a chain with one component). | ||
80 | A chain normally consist of one source/sink BIO | ||
81 | and one or more filter BIOs. | ||
82 | Data read from or written to the first BIO then traverses the chain | ||
83 | to 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 |
86 | A | ||
87 | .Vt BIO | ||
88 | is an I/O abstraction object, hiding many of the underlying I/O | ||
89 | details from an application. | ||
90 | If an application uses BIOs for its I/O, it can transparently handle | ||
91 | SSL connections, unencrypted network connections, and file I/O. | ||
92 | .Pp | ||
85 | The | 93 | The |
86 | .Fn BIO_new | 94 | .Fn BIO_new |
87 | function returns a new BIO using method | 95 | function constructs a new |
96 | .Vt BIO | ||
97 | using the method | ||
88 | .Fa type . | 98 | .Fa type . |
99 | There are two groups of BIO types, source/sink BIOs and a filter BIOs. | ||
100 | .Pp | ||
101 | Source/sink BIOs provide input or consume output. | ||
102 | Examples include socket BIOs and file BIOs. | ||
103 | .Pp | ||
104 | Filter BIOs take data from one BIO and pass it through to another, | ||
105 | or to the application, forming a chain of BIOs. | ||
106 | The data may be left unmodified (for example by a message digest BIO) | ||
107 | or translated (for example by an encryption BIO). | ||
108 | The effect of a filter BIO may change according to the I/O operation | ||
109 | it is performing: for example an encryption BIO will encrypt data | ||
110 | if it is written to and decrypt data if it is read from. | ||
111 | .Pp | ||
112 | Some BIOs (such as memory BIOs) can be used immediately after calling | ||
113 | .Fn BIO_new . | ||
114 | Others (such as file BIOs) need some additional initialization, and | ||
115 | utility functions exists to construct and initialize such BIOs. | ||
116 | .Pp | ||
117 | Normally the | ||
118 | .Fa type | ||
119 | argument is supplied by a function which returns a pointer to a | ||
120 | .Vt BIO_METHOD . | ||
121 | There is a naming convention for such functions: | ||
122 | the methods for source/sink BIOs are called | ||
123 | .Fn BIO_s_* | ||
124 | and those for filter BIOs | ||
125 | .Fn BIO_f_* . | ||
89 | .Pp | 126 | .Pp |
90 | .Fn BIO_set | 127 | .Fn BIO_set |
91 | sets the method of an already existing BIO. | 128 | sets the method of an already existing BIO. |
92 | .Pp | 129 | .Pp |
93 | .Fn BIO_free | 130 | .Fn BIO_free |
94 | frees up a single BIO; | 131 | and |
95 | .Fn BIO_vfree | 132 | .Fn BIO_vfree |
96 | also frees up a single BIO, but it does not return a value. | 133 | destruct a single BIO, which may also have some effect on the |
134 | underlying I/O structure, for example it may close the file being | ||
135 | referred to under certain circumstances. | ||
97 | If | 136 | If |
98 | .Fa a | 137 | .Fa a |
99 | is a | 138 | is a |
100 | .Dv NULL | 139 | .Dv NULL |
101 | pointer, no action occurs. | 140 | pointer, no action occurs. |
102 | Calling | 141 | If |
103 | .Fn BIO_free | 142 | .Fn BIO_free |
104 | may also have some effect on the underlying I/O structure, | 143 | is called on a BIO chain, it will only destruct one BIO, |
105 | for example it may close the file being | 144 | resulting in a memory leak. |
106 | referred to under certain circumstances. | ||
107 | For more details see the individual | ||
108 | .Vt BIO_METHOD | ||
109 | descriptions. | ||
110 | .Pp | 145 | .Pp |
111 | .Fn BIO_free_all | 146 | .Fn BIO_free_all |
112 | frees up an entire BIO chain. | 147 | destructs an entire BIO chain. |
113 | It does not halt if an error occurs | 148 | It does not halt if an error occurs |
114 | freeing up an individual BIO in the chain. | 149 | destructing an individual BIO in the chain. |
115 | If | 150 | If |
116 | .Fa a | 151 | .Fa a |
117 | is a | 152 | is a |
118 | .Dv NULL | 153 | .Dv NULL |
119 | pointer, no action occurs. | 154 | pointer, no action occurs. |
120 | .Pp | ||
121 | Some BIOs (such as memory BIOs) can be used immediately after calling | ||
122 | .Fn BIO_new . | ||
123 | Others (such as file BIOs) need some additional initialization, and | ||
124 | frequently a utility function exists to create and initialize such BIOs. | ||
125 | .Pp | ||
126 | If | ||
127 | .Fn BIO_free | ||
128 | is called on a BIO chain, it will only free one BIO, | ||
129 | resulting in a memory leak. | ||
130 | .Pp | ||
131 | Calling | 155 | Calling |
132 | .Fn BIO_free_all | 156 | .Fn BIO_free_all |
133 | on a single BIO has the same effect as calling | 157 | on a single BIO has the same effect as |
134 | .Fn BIO_free | 158 | .Fn BIO_vfree . |
135 | on it other than the discarded return value. | ||
136 | .Pp | 159 | .Pp |
137 | Normally the | 160 | Common I/O functions are documented in |
138 | .Fa type | 161 | .Xr BIO_read 3 . |
139 | argument is supplied by a function which returns a pointer to a | 162 | Forming chains is explained in |
140 | .Vt BIO_METHOD . | 163 | .Xr BIO_push 3 , |
141 | There is a naming convention for such functions: | 164 | inspecting them in |
142 | a source/sink BIO is normally called | 165 | .Xr BIO_find_type 3 . |
143 | .Fn BIO_s_* | 166 | For more details about the different kinds of BIOs, see the individual |
144 | and a filter BIO | 167 | .Vt BIO_METHOD |
145 | .Fn BIO_f_* . | 168 | manual pages. |
146 | .Sh RETURN VALUES | 169 | .Sh RETURN VALUES |
147 | .Fn BIO_new | 170 | .Fn BIO_new |
148 | returns a newly created BIO or | 171 | returns a newly constructed |
172 | .Vt BIO | ||
173 | object or | ||
149 | .Dv NULL | 174 | .Dv NULL |
150 | if the call fails. | 175 | on failure. |
151 | .Pp | 176 | .Pp |
152 | .Fn BIO_set | 177 | .Fn BIO_set |
153 | and | 178 | and |
154 | .Fn BIO_free | 179 | .Fn BIO_free |
155 | return 1 for success and 0 for failure. | 180 | return 1 for success or 0 for failure. |
156 | .Sh EXAMPLES | 181 | .Sh EXAMPLES |
157 | Create a memory BIO: | 182 | Create 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 |
71 | BIOs can be joined together to form chains. | ||
72 | A chain normally consist of one or more filter BIOs | ||
73 | and one source/sink BIO at the end. | ||
74 | Data read from or written to the first BIO traverses the chain | ||
75 | to the end. | ||
76 | A single BIO can be regarded as a chain with one component. | ||
77 | .Pp | ||
70 | The | 78 | The |
71 | .Fn BIO_push | 79 | .Fn BIO_push |
72 | function appends the BIO | 80 | function appends the BIO |
@@ -97,8 +105,9 @@ The process of calling | |||
97 | .Fn BIO_push | 105 | .Fn BIO_push |
98 | and | 106 | and |
99 | .Fn BIO_pop | 107 | .Fn BIO_pop |
100 | on a BIO may have additional consequences: | 108 | on a BIO may have additional consequences: a |
101 | a control call is made to the affected BIOs. | 109 | .Xr BIO_ctrl 3 |
110 | call is made to the affected BIOs. | ||
102 | Any effects will be noted in the descriptions of individual BIOs. | 111 | Any 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 | |||
163 | data can be written to | 172 | data can be written to |
164 | .Sy md1 | 173 | .Sy md1 |
165 | as before. | 174 | as 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 \ |