diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/BIO_read.3 | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/src/lib/libcrypto/man/BIO_read.3 b/src/lib/libcrypto/man/BIO_read.3 index 3f059b5d54..ac809bc782 100644 --- a/src/lib/libcrypto/man/BIO_read.3 +++ b/src/lib/libcrypto/man/BIO_read.3 | |||
| @@ -1,7 +1,24 @@ | |||
| 1 | .\" $OpenBSD: BIO_read.3,v 1.9 2021/11/14 13:40:16 schwarze Exp $ | 1 | .\" $OpenBSD: BIO_read.3,v 1.10 2021/12/08 16:31:10 schwarze Exp $ |
| 2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
| 8 | .\" | ||
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 11 | .\" copyright notice and this permission notice appear in all copies. | ||
| 12 | .\" | ||
| 13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 20 | .\" | ||
| 21 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 2000, 2016 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2000, 2016 The OpenSSL Project. All rights reserved. |
| 6 | .\" | 23 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
| @@ -48,14 +65,15 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 67 | .\" |
| 51 | .Dd $Mdocdate: November 14 2021 $ | 68 | .Dd $Mdocdate: December 8 2021 $ |
| 52 | .Dt BIO_READ 3 | 69 | .Dt BIO_READ 3 |
| 53 | .Os | 70 | .Os |
| 54 | .Sh NAME | 71 | .Sh NAME |
| 55 | .Nm BIO_read , | 72 | .Nm BIO_read , |
| 56 | .Nm BIO_gets , | 73 | .Nm BIO_gets , |
| 57 | .Nm BIO_write , | 74 | .Nm BIO_write , |
| 58 | .Nm BIO_puts | 75 | .Nm BIO_puts , |
| 76 | .Nm BIO_indent | ||
| 59 | .Nd BIO I/O functions | 77 | .Nd BIO I/O functions |
| 60 | .Sh SYNOPSIS | 78 | .Sh SYNOPSIS |
| 61 | .In openssl/bio.h | 79 | .In openssl/bio.h |
| @@ -80,13 +98,19 @@ | |||
| 80 | .Ft int | 98 | .Ft int |
| 81 | .Fo BIO_puts | 99 | .Fo BIO_puts |
| 82 | .Fa "BIO *b" | 100 | .Fa "BIO *b" |
| 83 | .Fa "const char *buf" | 101 | .Fa "const char *string" |
| 102 | .Fc | ||
| 103 | .Ft int | ||
| 104 | .Fo BIO_indent | ||
| 105 | .Fa "BIO *b" | ||
| 106 | .Fa "int indent" | ||
| 107 | .Fa "int max" | ||
| 84 | .Fc | 108 | .Fc |
| 85 | .Sh DESCRIPTION | 109 | .Sh DESCRIPTION |
| 86 | .Fn BIO_read | 110 | .Fn BIO_read |
| 87 | attempts to read | 111 | attempts to read |
| 88 | .Fa len | 112 | .Fa len |
| 89 | bytes from BIO | 113 | bytes from |
| 90 | .Fa b | 114 | .Fa b |
| 91 | and places the data in | 115 | and places the data in |
| 92 | .Fa buf . | 116 | .Fa buf . |
| @@ -110,15 +134,24 @@ attempts to write | |||
| 110 | .Fa len | 134 | .Fa len |
| 111 | bytes from | 135 | bytes from |
| 112 | .Fa buf | 136 | .Fa buf |
| 113 | to BIO | 137 | to |
| 114 | .Fa b . | 138 | .Fa b . |
| 115 | .Pp | 139 | .Pp |
| 116 | .Fn BIO_puts | 140 | .Fn BIO_puts |
| 117 | attempts to write a null terminated string | 141 | attempts to write the NUL-terminated |
| 118 | .Fa buf | 142 | .Fa string |
| 119 | to BIO | 143 | to |
| 120 | .Fa b . | 144 | .Fa b . |
| 121 | .Pp | 145 | .Pp |
| 146 | .Fn BIO_indent | ||
| 147 | attempts to write | ||
| 148 | .Fa indent | ||
| 149 | space characters to | ||
| 150 | .Fa b , | ||
| 151 | but not more than | ||
| 152 | .Fa max | ||
| 153 | characters. | ||
| 154 | .Pp | ||
| 122 | One technique sometimes used with blocking sockets | 155 | One technique sometimes used with blocking sockets |
| 123 | is to use a system call (such as | 156 | is to use a system call (such as |
| 124 | .Xr select 2 , | 157 | .Xr select 2 , |
| @@ -152,7 +185,11 @@ work around this by adding a buffering BIO | |||
| 152 | .Xr BIO_f_buffer 3 | 185 | .Xr BIO_f_buffer 3 |
| 153 | to the chain. | 186 | to the chain. |
| 154 | .Sh RETURN VALUES | 187 | .Sh RETURN VALUES |
| 155 | All these functions return either the amount of data successfully | 188 | .Fn BIO_indent |
| 189 | returns 1 if successful, even if nothing was written, | ||
| 190 | or 0 if writing fails. | ||
| 191 | .Pp | ||
| 192 | The other functions return either the amount of data successfully | ||
| 156 | read or written (if the return value is positive) or that no data | 193 | read or written (if the return value is positive) or that no data |
| 157 | was successfully read or written if the result is 0 or \-1. | 194 | was successfully read or written if the result is 0 or \-1. |
| 158 | If the return value is \-2, then the operation is not implemented | 195 | If the return value is \-2, then the operation is not implemented |
| @@ -176,3 +213,7 @@ and | |||
| 176 | .Fn BIO_puts | 213 | .Fn BIO_puts |
| 177 | first appeared in SSLeay 0.6.0 and have been available since | 214 | first appeared in SSLeay 0.6.0 and have been available since |
| 178 | .Ox 2.4 . | 215 | .Ox 2.4 . |
| 216 | .Pp | ||
| 217 | .Fn BIO_indent | ||
| 218 | first appeared in OpenSSL 0.9.7 and has been available since | ||
| 219 | .Ox 3.4 . | ||
