summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2023-04-06 19:23:12 +0000
committerschwarze <>2023-04-06 19:23:12 +0000
commit5e81190c47459df0e4b2cb7146555853aff0c84b (patch)
treea170f575914040e1f469a52885c4181c1d9d79eb
parent383b8bb0a5bb367cf3cf5bc6230105ca7cecaace (diff)
downloadopenbsd-5e81190c47459df0e4b2cb7146555853aff0c84b.tar.gz
openbsd-5e81190c47459df0e4b2cb7146555853aff0c84b.tar.bz2
openbsd-5e81190c47459df0e4b2cb7146555853aff0c84b.zip
Document the effects that BIO_set_info_callback(3), BIO_callback_ctrl(3),
BIO_get_info_callback(3), and BIO_info_cb(3) have on connect BIOs.
-rw-r--r--src/lib/libcrypto/man/BIO_s_connect.357
1 files changed, 54 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_connect.3 b/src/lib/libcrypto/man/BIO_s_connect.3
index ee6d4e38e1..2eeee197c5 100644
--- a/src/lib/libcrypto/man/BIO_s_connect.3
+++ b/src/lib/libcrypto/man/BIO_s_connect.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: BIO_s_connect.3,v 1.14 2022/12/18 19:35:36 schwarze Exp $ 1.\" $OpenBSD: BIO_s_connect.3,v 1.15 2023/04/06 19:23:12 schwarze Exp $
2.\" full merge up to: OpenSSL 0e474b8b Nov 1 15:45:49 2015 +0100 2.\" full merge up to: OpenSSL 0e474b8b Nov 1 15:45:49 2015 +0100
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) 2023 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, 2015 The OpenSSL Project. All rights reserved. 22.\" Copyright (c) 2000, 2015 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,7 +65,7 @@
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: December 18 2022 $ 68.Dd $Mdocdate: April 6 2023 $
52.Dt BIO_S_CONNECT 3 69.Dt BIO_S_CONNECT 3
53.Os 70.Os
54.Sh NAME 71.Sh NAME
@@ -161,6 +178,40 @@ is not
161it should be of type 178it should be of type
162.Vt "int *" . 179.Vt "int *" .
163.Pp 180.Pp
181.Xr BIO_set_info_callback 3
182and
183.Xr BIO_callback_ctrl 3
184with a
185.Fa cmd
186of
187.Dv BIO_CTRL_SET_CALLBACK
188save the pointer to the
189.Fa cb
190function internally in
191.Fa b
192and
193.Xr BIO_get_info_callback 3
194retrieves this function pointer.
195If such an info callback is installed, it is invoked whenever
196a state change or error occurs in the connect BIO state machine.
197The arguments of the callback include the new
198.Fa state
199in case of a state change or the old
200.Fa state
201in case of an error and the value
202.Fa res
203that the state machine would return to whatever operation invoked it
204if no info callback had been installed.
205If an info callback is installed, the state machine
206returns the return value of the info callback instead.
207Consequently, the info callback is supposed to usually return
208.Fa res .
209The precise effect of the return value depends on which operation
210the state machine was invoked from.
211Usually, \-1 is used to indicate failure and return values less than
212or equal to zero abort the operation in question, whereas positive
213values indicate success and allow the operation to proceed.
214.Pp
164.Fn BIO_set_conn_hostname 215.Fn BIO_set_conn_hostname
165uses the string 216uses the string
166.Fa name 217.Fa name