diff options
| author | schwarze <> | 2016-11-18 18:47:44 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-18 18:47:44 +0000 |
| commit | aa4fa8d462c2f501a30d8a4b70677382c3878ed8 (patch) | |
| tree | 36f4306628c5215ad97c26e2ee468680a5766d97 /src | |
| parent | e91600f6fbbde24ee151b5d01b607656db4e0c50 (diff) | |
| download | openbsd-aa4fa8d462c2f501a30d8a4b70677382c3878ed8.tar.gz openbsd-aa4fa8d462c2f501a30d8a4b70677382c3878ed8.tar.bz2 openbsd-aa4fa8d462c2f501a30d8a4b70677382c3878ed8.zip | |
Add Copyright and license.
In the SYNOPSIS, provide prototypes rather than #define directives.
Bring in improvements to the EXAMPLES section from OpenSSL.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/BIO_s_bio.3 | 133 |
1 files changed, 105 insertions, 28 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_bio.3 b/src/lib/libcrypto/man/BIO_s_bio.3 index ccd3bf8ef9..7d38537461 100644 --- a/src/lib/libcrypto/man/BIO_s_bio.3 +++ b/src/lib/libcrypto/man/BIO_s_bio.3 | |||
| @@ -1,6 +1,59 @@ | |||
| 1 | .\" $OpenBSD: BIO_s_bio.3,v 1.5 2016/11/07 15:52:47 jmc Exp $ | 1 | .\" $OpenBSD: BIO_s_bio.3,v 1.6 2016/11/18 18:47:44 schwarze Exp $ |
| 2 | .\" OpenSSL c03726ca Aug 27 12:28:08 2015 -0400 | ||
| 2 | .\" | 3 | .\" |
| 3 | .Dd $Mdocdate: November 7 2016 $ | 4 | .\" This file was written by |
| 5 | .\" Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>, | ||
| 6 | .\" Dr. Stephen Henson <steve@openssl.org>, | ||
| 7 | .\" Bodo Moeller <bodo@openssl.org>, | ||
| 8 | .\" and Richard Levitte <levitte@openssl.org>. | ||
| 9 | .\" Copyright (c) 2000, 2002, 2015, 2016 The OpenSSL Project. | ||
| 10 | .\" All rights reserved. | ||
| 11 | .\" | ||
| 12 | .\" Redistribution and use in source and binary forms, with or without | ||
| 13 | .\" modification, are permitted provided that the following conditions | ||
| 14 | .\" are met: | ||
| 15 | .\" | ||
| 16 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 17 | .\" notice, this list of conditions and the following disclaimer. | ||
| 18 | .\" | ||
| 19 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 20 | .\" notice, this list of conditions and the following disclaimer in | ||
| 21 | .\" the documentation and/or other materials provided with the | ||
| 22 | .\" distribution. | ||
| 23 | .\" | ||
| 24 | .\" 3. All advertising materials mentioning features or use of this | ||
| 25 | .\" software must display the following acknowledgment: | ||
| 26 | .\" "This product includes software developed by the OpenSSL Project | ||
| 27 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 28 | .\" | ||
| 29 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 30 | .\" endorse or promote products derived from this software without | ||
| 31 | .\" prior written permission. For written permission, please contact | ||
| 32 | .\" openssl-core@openssl.org. | ||
| 33 | .\" | ||
| 34 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 35 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 36 | .\" permission of the OpenSSL Project. | ||
| 37 | .\" | ||
| 38 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 39 | .\" acknowledgment: | ||
| 40 | .\" "This product includes software developed by the OpenSSL Project | ||
| 41 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 42 | .\" | ||
| 43 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 44 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 45 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 46 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 47 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 48 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 49 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 50 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 51 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 52 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 53 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 54 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 55 | .\" | ||
| 56 | .Dd $Mdocdate: November 18 2016 $ | ||
| 4 | .Dt BIO_S_BIO 3 | 57 | .Dt BIO_S_BIO 3 |
| 5 | .Os | 58 | .Os |
| 6 | .Sh NAME | 59 | .Sh NAME |
| @@ -23,19 +76,29 @@ | |||
| 23 | .Fo BIO_s_bio | 76 | .Fo BIO_s_bio |
| 24 | .Fa void | 77 | .Fa void |
| 25 | .Fc | 78 | .Fc |
| 26 | .Bd -unfilled | 79 | .Ft int |
| 27 | #define BIO_make_bio_pair(b1, b2) \e | 80 | .Fo BIO_make_bio_pair |
| 28 | (int)BIO_ctrl(b1, BIO_C_MAKE_BIO_PAIR, 0, b2) | 81 | .Fa "BIO *b1" |
| 29 | #define BIO_destroy_bio_pair(b) \e | 82 | .Fa "BIO *b2" |
| 30 | (int)BIO_ctrl(b, BIO_C_DESTROY_BIO_PAIR, 0, NULL) | 83 | .Fc |
| 31 | #define BIO_shutdown_wr(b) \e | 84 | .Ft int |
| 32 | (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) | 85 | .Fo BIO_destroy_bio_pair |
| 33 | #define BIO_set_write_buf_size(b, size) \e | 86 | .Fa "BIO *b" |
| 34 | (int)BIO_ctrl(b, BIO_C_SET_WRITE_BUF_SIZE, size, NULL) | 87 | .Fc |
| 35 | #define BIO_get_write_buf_size(b, size) \e | 88 | .Ft int |
| 36 | (size_t)BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL) | 89 | .Fo BIO_shutdown_wr |
| 37 | .Ed | 90 | .Fa "BIO *b" |
| 38 | .Pp | 91 | .Fc |
| 92 | .Ft int | ||
| 93 | .Fo BIO_set_write_buf_size | ||
| 94 | .Fa "BIO *b" | ||
| 95 | .Fa "long size" | ||
| 96 | .Fc | ||
| 97 | .Ft size_t | ||
| 98 | .Fo BIO_get_write_buf_size | ||
| 99 | .Fa "BIO *b" | ||
| 100 | .Fa "long size" | ||
| 101 | .Fc | ||
| 39 | .Ft int | 102 | .Ft int |
| 40 | .Fo BIO_new_bio_pair | 103 | .Fo BIO_new_bio_pair |
| 41 | .Fa "BIO **bio1" | 104 | .Fa "BIO **bio1" |
| @@ -43,20 +106,18 @@ | |||
| 43 | .Fa "BIO **bio2" | 106 | .Fa "BIO **bio2" |
| 44 | .Fa "size_t writebuf2" | 107 | .Fa "size_t writebuf2" |
| 45 | .Fc | 108 | .Fc |
| 46 | .Bd -unfilled | 109 | .Ft size_t |
| 47 | #define BIO_get_write_guarantee(b) \e | 110 | .Fo BIO_get_write_guarantee |
| 48 | (int)BIO_ctrl(b, BIO_C_GET_WRITE_GUARANTEE, 0, NULL) | 111 | .Fa "BIO *b" |
| 49 | .Ed | 112 | .Fc |
| 50 | .Pp | ||
| 51 | .Ft size_t | 113 | .Ft size_t |
| 52 | .Fo BIO_ctrl_get_write_guarantee | 114 | .Fo BIO_ctrl_get_write_guarantee |
| 53 | .Fa "BIO *b" | 115 | .Fa "BIO *b" |
| 54 | .Fc | 116 | .Fc |
| 55 | .Bd -unfilled | 117 | .Ft int |
| 56 | #define BIO_get_read_request(b) \e | 118 | .Fo BIO_get_read_request |
| 57 | (int)BIO_ctrl(b, BIO_C_GET_READ_REQUEST, 0, NULL) | 119 | .Fa "BIO *b" |
| 58 | .Ed | 120 | .Fc |
| 59 | .Pp | ||
| 60 | .Ft size_t | 121 | .Ft size_t |
| 61 | .Fo BIO_ctrl_get_read_request | 122 | .Fo BIO_ctrl_get_read_request |
| 62 | .Fa "BIO *b" | 123 | .Fa "BIO *b" |
| @@ -221,6 +282,19 @@ will be true. | |||
| 221 | If the application then waits for data to become available | 282 | If the application then waits for data to become available |
| 222 | on the underlying transport before flushing the write buffer, | 283 | on the underlying transport before flushing the write buffer, |
| 223 | it will never succeed because the request was never sent. | 284 | it will never succeed because the request was never sent. |
| 285 | .Pp | ||
| 286 | .Xr BIO_eof 3 | ||
| 287 | is true if no data is in the peer BIO and the peer BIO has been shutdown. | ||
| 288 | .Pp | ||
| 289 | .Fn BIO_make_bio_pair , | ||
| 290 | .Fn BIO_destroy_bio_pair , | ||
| 291 | .Fn BIO_shutdown_wr , | ||
| 292 | .Fn BIO_set_write_buf_size , | ||
| 293 | .Fn BIO_get_write_buf_size , | ||
| 294 | .Fn BIO_get_write_guarantee , | ||
| 295 | and | ||
| 296 | .Fn BIO_get_read_request | ||
| 297 | are implemented as macros. | ||
| 224 | .Sh RETURN VALUES | 298 | .Sh RETURN VALUES |
| 225 | .Fn BIO_new_bio_pair | 299 | .Fn BIO_new_bio_pair |
| 226 | returns 1 on success, with the new BIOs available in | 300 | returns 1 on success, with the new BIOs available in |
| @@ -242,9 +316,9 @@ on the socket as required without having to go through the SSL interface. | |||
| 242 | .Bd -literal -offset 2n | 316 | .Bd -literal -offset 2n |
| 243 | BIO *internal_bio, *network_bio; | 317 | BIO *internal_bio, *network_bio; |
| 244 | \&... | 318 | \&... |
| 245 | BIO_new_bio_pair(internal_bio, 0, network_bio, 0); | 319 | BIO_new_bio_pair(&internal_bio, 0, &network_bio, 0); |
| 246 | SSL_set_bio(ssl, internal_bio, internal_bio); | 320 | SSL_set_bio(ssl, internal_bio, internal_bio); |
| 247 | SSL_operations(); | 321 | SSL_operations(); /* e.g. SSL_read() and SSL_write() */ |
| 248 | \&... | 322 | \&... |
| 249 | 323 | ||
| 250 | application | TLS-engine | 324 | application | TLS-engine |
| @@ -253,7 +327,10 @@ application | TLS-engine | |||
| 253 | | /\e || | 327 | | /\e || |
| 254 | | || \e/ | 328 | | || \e/ |
| 255 | | BIO-pair (internal_bio) | 329 | | BIO-pair (internal_bio) |
| 256 | +----------< BIO-pair (network_bio) | 330 | | BIO-pair (network_bio) |
| 331 | | || /\ | ||
| 332 | | \/ || | ||
| 333 | +-----------< BIO_operations() | ||
| 257 | | | | 334 | | | |
| 258 | socket | | 335 | socket | |
| 259 | 336 | ||
