summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BIO_ctrl.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/BIO_ctrl.3')
-rw-r--r--src/lib/libcrypto/man/BIO_ctrl.343
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 @@
122and 122and
123.Fn BIO_int_ctrl 123.Fn BIO_int_ctrl
124are BIO "control" operations taking arguments of various types. 124are BIO "control" operations taking arguments of various types.
125These functions are not normally called directly, 125These functions are not normally called directly -
126various macros are used instead. 126various macros are used instead.
127The standard macros are described below, macros specific to a 127The standard macros are described below.
128particular type of BIO are described in the specific BIO's manual 128Macros specific to a particular type of BIO
129page as well as any special features of the standard calls. 129are described in the specific BIO's manual page
130as well as any special features of the standard calls.
130.Pp 131.Pp
131.Fn BIO_reset 132.Fn BIO_reset
132typically resets a BIO to some initial state, in the case 133typically resets a BIO to some initial state.
133of file related BIOs for example it rewinds the file pointer 134In the case of file related BIOs, for example,
134to the start of the file. 135it rewinds the file pointer to the start of the file.
135.Pp 136.Pp
136.Fn BIO_seek 137.Fn BIO_seek
137resets a file related BIO's (that is file descriptor and 138resets a file related BIO's (that is file descriptor and
@@ -143,12 +144,12 @@ bytes from start of file.
143returns the current file position of a file related BIO. 144returns the current file position of a file related BIO.
144.Pp 145.Pp
145.Fn BIO_flush 146.Fn BIO_flush
146normally writes out any internally buffered data, in some cases 147normally writes out any internally buffered data.
147it is used to signal EOF and that no more data will be written. 148In 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
150returns 1 if the BIO has read EOF, the precise meaning of 151returns 1 if the BIO has read EOF.
151"EOF" varies according to the BIO type. 152The precise meaning of "EOF" varies according to the BIO type.
152.Pp 153.Pp
153.Fn BIO_set_close 154.Fn BIO_set_close
154sets the BIO 155sets the BIO
@@ -180,7 +181,7 @@ and
180.Fn BIO_ctrl_wpending 181.Fn BIO_ctrl_wpending
181return a 182return a
182.Vt size_t 183.Vt size_t
183type and are functions, 184type and are functions.
184.Fn BIO_pending 185.Fn BIO_pending
185and 186and
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
191normally returns 1 for success and 0 or -1 for failure. 192normally returns 1 for success and 0 or -1 for failure.
192File BIOs are an exception, they return 0 for success and -1 for failure. 193File BIOs are an exception, returning 0 for success and -1 for failure.
193.Pp 194.Pp
194.Fn BIO_seek 195.Fn BIO_seek
195and 196and
@@ -203,7 +204,7 @@ always return 0 for success and -1 for failure.
203returns 1 for success and 0 or -1 for failure. 204returns 1 for success and 0 or -1 for failure.
204.Pp 205.Pp
205.Fn BIO_eof 206.Fn BIO_eof
206returns 1 if EOF has been reached 0 otherwise. 207returns 1 if EOF has been reached or 0 otherwise.
207.Pp 208.Pp
208.Fn BIO_set_close 209.Fn BIO_set_close
209always returns 1. 210always returns 1.
@@ -228,7 +229,7 @@ in a similar manner to
228.Fn BIO_write . 229.Fn BIO_write .
229The 230The
230.Fn BIO_should_retry 231.Fn BIO_should_retry
231call should be used and appropriate action taken is the call fails. 232call should be used and appropriate action taken if the call fails.
232.Pp 233.Pp
233The return values of 234The 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.
238For example in the case of a file BIO some data may be available in the 239For example in the case of a file BIO some data may be available in the
239.Vt FILE 240.Vt FILE
240structure's internal buffers but it is not possible 241structure's internal buffers but it is not possible
241to determine this in a portably way. 242to determine this in a portable way.
242For other types of BIO they may not be supported. 243For other types of BIO they may not be supported.
243.Pp 244.Pp
244If they do not internally handle a particular 245If they do not internally handle a particular
@@ -246,10 +247,10 @@ If they do not internally handle a particular
246operation, filter BIOs usually pass the operation 247operation, filter BIOs usually pass the operation
247to the next BIO in the chain. 248to the next BIO in the chain.
248This often means there is no need to locate the required BIO for 249This often means there is no need to locate the required BIO for
249a particular operation, it can be called on a chain and it will 250a particular operation: it can be called on a chain and it will
250be automatically passed to the relevant BIO. 251be automatically passed to the relevant BIO.
251However this can cause unexpected results: 252However this can cause unexpected results.
252for example no current filter BIOs implement 253For example no current filter BIOs implement
253.Fn BIO_seek , 254.Fn BIO_seek ,
254but this may still succeed if the chain ends 255but this may still succeed if the chain ends
255in a FILE or file descriptor BIO. 256in a FILE or file descriptor BIO.