diff options
Diffstat (limited to 'src/lib/libcrypto/man/BIO_ctrl.3')
-rw-r--r-- | src/lib/libcrypto/man/BIO_ctrl.3 | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/lib/libcrypto/man/BIO_ctrl.3 b/src/lib/libcrypto/man/BIO_ctrl.3 index 391158bd42..6557d10730 100644 --- a/src/lib/libcrypto/man/BIO_ctrl.3 +++ b/src/lib/libcrypto/man/BIO_ctrl.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: BIO_ctrl.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BIO_ctrl.3,v 1.4 2016/11/07 15:52:47 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 7 2016 $ |
4 | .Dt BIO_CTRL 3 | 4 | .Dt BIO_CTRL 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -122,16 +122,17 @@ | |||
122 | and | 122 | and |
123 | .Fn BIO_int_ctrl | 123 | .Fn BIO_int_ctrl |
124 | are BIO "control" operations taking arguments of various types. | 124 | are BIO "control" operations taking arguments of various types. |
125 | These functions are not normally called directly, | 125 | These functions are not normally called directly - |
126 | various macros are used instead. | 126 | various macros are used instead. |
127 | The standard macros are described below, macros specific to a | 127 | The standard macros are described below. |
128 | particular type of BIO are described in the specific BIO's manual | 128 | Macros specific to a particular type of BIO |
129 | page as well as any special features of the standard calls. | 129 | are described in the specific BIO's manual page |
130 | as well as any special features of the standard calls. | ||
130 | .Pp | 131 | .Pp |
131 | .Fn BIO_reset | 132 | .Fn BIO_reset |
132 | typically resets a BIO to some initial state, in the case | 133 | typically resets a BIO to some initial state. |
133 | of file related BIOs for example it rewinds the file pointer | 134 | In the case of file related BIOs, for example, |
134 | to the start of the file. | 135 | it rewinds the file pointer to the start of the file. |
135 | .Pp | 136 | .Pp |
136 | .Fn BIO_seek | 137 | .Fn BIO_seek |
137 | resets a file related BIO's (that is file descriptor and | 138 | resets a file related BIO's (that is file descriptor and |
@@ -143,12 +144,12 @@ bytes from start of file. | |||
143 | returns the current file position of a file related BIO. | 144 | returns the current file position of a file related BIO. |
144 | .Pp | 145 | .Pp |
145 | .Fn BIO_flush | 146 | .Fn BIO_flush |
146 | normally writes out any internally buffered data, in some cases | 147 | normally writes out any internally buffered data. |
147 | it is used to signal EOF and that no more data will be written. | 148 | In some cases it is used to signal EOF and that no more data will be written. |
148 | .Pp | 149 | .Pp |
149 | .Fn BIO_eof | 150 | .Fn BIO_eof |
150 | returns 1 if the BIO has read EOF, the precise meaning of | 151 | returns 1 if the BIO has read EOF. |
151 | "EOF" varies according to the BIO type. | 152 | The precise meaning of "EOF" varies according to the BIO type. |
152 | .Pp | 153 | .Pp |
153 | .Fn BIO_set_close | 154 | .Fn BIO_set_close |
154 | sets the BIO | 155 | sets the BIO |
@@ -180,7 +181,7 @@ and | |||
180 | .Fn BIO_ctrl_wpending | 181 | .Fn BIO_ctrl_wpending |
181 | return a | 182 | return a |
182 | .Vt size_t | 183 | .Vt size_t |
183 | type and are functions, | 184 | type and are functions. |
184 | .Fn BIO_pending | 185 | .Fn BIO_pending |
185 | and | 186 | and |
186 | .Fn BIO_wpending | 187 | .Fn BIO_wpending |
@@ -189,7 +190,7 @@ are macros which call | |||
189 | .Sh RETURN VALUES | 190 | .Sh RETURN VALUES |
190 | .Fn BIO_reset | 191 | .Fn BIO_reset |
191 | normally returns 1 for success and 0 or -1 for failure. | 192 | normally returns 1 for success and 0 or -1 for failure. |
192 | File BIOs are an exception, they return 0 for success and -1 for failure. | 193 | File BIOs are an exception, returning 0 for success and -1 for failure. |
193 | .Pp | 194 | .Pp |
194 | .Fn BIO_seek | 195 | .Fn BIO_seek |
195 | and | 196 | and |
@@ -203,7 +204,7 @@ always return 0 for success and -1 for failure. | |||
203 | returns 1 for success and 0 or -1 for failure. | 204 | returns 1 for success and 0 or -1 for failure. |
204 | .Pp | 205 | .Pp |
205 | .Fn BIO_eof | 206 | .Fn BIO_eof |
206 | returns 1 if EOF has been reached 0 otherwise. | 207 | returns 1 if EOF has been reached or 0 otherwise. |
207 | .Pp | 208 | .Pp |
208 | .Fn BIO_set_close | 209 | .Fn BIO_set_close |
209 | always returns 1. | 210 | always returns 1. |
@@ -228,7 +229,7 @@ in a similar manner to | |||
228 | .Fn BIO_write . | 229 | .Fn BIO_write . |
229 | The | 230 | The |
230 | .Fn BIO_should_retry | 231 | .Fn BIO_should_retry |
231 | call should be used and appropriate action taken is the call fails. | 232 | call should be used and appropriate action taken if the call fails. |
232 | .Pp | 233 | .Pp |
233 | The return values of | 234 | The return values of |
234 | .Fn BIO_pending | 235 | .Fn BIO_pending |
@@ -238,7 +239,7 @@ may not reliably determine the amount of pending data in all cases. | |||
238 | For example in the case of a file BIO some data may be available in the | 239 | For example in the case of a file BIO some data may be available in the |
239 | .Vt FILE | 240 | .Vt FILE |
240 | structure's internal buffers but it is not possible | 241 | structure's internal buffers but it is not possible |
241 | to determine this in a portably way. | 242 | to determine this in a portable way. |
242 | For other types of BIO they may not be supported. | 243 | For other types of BIO they may not be supported. |
243 | .Pp | 244 | .Pp |
244 | If they do not internally handle a particular | 245 | If they do not internally handle a particular |
@@ -246,10 +247,10 @@ If they do not internally handle a particular | |||
246 | operation, filter BIOs usually pass the operation | 247 | operation, filter BIOs usually pass the operation |
247 | to the next BIO in the chain. | 248 | to the next BIO in the chain. |
248 | This often means there is no need to locate the required BIO for | 249 | This often means there is no need to locate the required BIO for |
249 | a particular operation, it can be called on a chain and it will | 250 | a particular operation: it can be called on a chain and it will |
250 | be automatically passed to the relevant BIO. | 251 | be automatically passed to the relevant BIO. |
251 | However this can cause unexpected results: | 252 | However this can cause unexpected results. |
252 | for example no current filter BIOs implement | 253 | For example no current filter BIOs implement |
253 | .Fn BIO_seek , | 254 | .Fn BIO_seek , |
254 | but this may still succeed if the chain ends | 255 | but this may still succeed if the chain ends |
255 | in a FILE or file descriptor BIO. | 256 | in a FILE or file descriptor BIO. |