summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2022-12-17 22:21:24 +0000
committerschwarze <>2022-12-17 22:21:24 +0000
commit8e6b09175851278a9b2d2e5707ee16165c639c17 (patch)
treef86c5d174b9485cf29e97e2f184aab99c1c89220 /src/lib
parentfee9c0d2af35a8364f52776a6961953c657cc92f (diff)
downloadopenbsd-8e6b09175851278a9b2d2e5707ee16165c639c17.tar.gz
openbsd-8e6b09175851278a9b2d2e5707ee16165c639c17.tar.bz2
openbsd-8e6b09175851278a9b2d2e5707ee16165c639c17.zip
Document BIO_set_flags(3), BIO_clear_flags(3), BIO_test_flags(3),
and BIO_get_flags(3).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/BIO_get_data.392
1 files changed, 88 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/BIO_get_data.3 b/src/lib/libcrypto/man/BIO_get_data.3
index 3f740c1fe6..dd7858b771 100644
--- a/src/lib/libcrypto/man/BIO_get_data.3
+++ b/src/lib/libcrypto/man/BIO_get_data.3
@@ -1,10 +1,10 @@
1.\" $OpenBSD: BIO_get_data.3,v 1.4 2022/11/25 17:44:01 schwarze Exp $ 1.\" $OpenBSD: BIO_get_data.3,v 1.5 2022/12/17 22:21:24 schwarze Exp $
2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license: 5.\" The changes are covered by the following Copyright and license:
6.\" 6.\"
7.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> 7.\" Copyright (c) 2018, 2022 Ingo Schwarze <schwarze@openbsd.org>
8.\" 8.\"
9.\" Permission to use, copy, modify, and distribute this software for any 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 10.\" purpose with or without fee is hereby granted, provided that the above
@@ -65,12 +65,16 @@
65.\" 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
66.\" OF THE POSSIBILITY OF SUCH DAMAGE. 66.\" OF THE POSSIBILITY OF SUCH DAMAGE.
67.\" 67.\"
68.Dd $Mdocdate: November 25 2022 $ 68.Dd $Mdocdate: December 17 2022 $
69.Dt BIO_GET_DATA 3 69.Dt BIO_GET_DATA 3
70.Os 70.Os
71.Sh NAME 71.Sh NAME
72.Nm BIO_set_data , 72.Nm BIO_set_data ,
73.Nm BIO_get_data , 73.Nm BIO_get_data ,
74.Nm BIO_set_flags ,
75.Nm BIO_clear_flags ,
76.Nm BIO_test_flags ,
77.Nm BIO_get_flags ,
74.Nm BIO_set_init , 78.Nm BIO_set_init ,
75.Nm BIO_get_init , 79.Nm BIO_get_init ,
76.Nm BIO_set_shutdown , 80.Nm BIO_set_shutdown ,
@@ -88,6 +92,25 @@
88.Fa "BIO *a" 92.Fa "BIO *a"
89.Fc 93.Fc
90.Ft void 94.Ft void
95.Fo BIO_set_flags
96.Fa "BIO *a"
97.Fa "int flags"
98.Fc
99.Ft void
100.Fo BIO_clear_flags
101.Fa "BIO *a"
102.Fa "int flags"
103.Fc
104.Ft int
105.Fo BIO_test_flags
106.Fa "const BIO *a"
107.Fa "int flags"
108.Fc
109.Ft int
110.Fo BIO_get_flags
111.Fa "const BIO *a"
112.Fc
113.Ft void
91.Fo BIO_set_init 114.Fo BIO_set_init
92.Fa "BIO *a" 115.Fa "BIO *a"
93.Fa "int init" 116.Fa "int init"
@@ -119,6 +142,39 @@ This data can subsequently be retrieved via a call to
119This can be used by custom BIOs for storing implementation specific 142This can be used by custom BIOs for storing implementation specific
120information. 143information.
121.Pp 144.Pp
145.Fn BIO_set_flags
146sets all the bits contained in the
147.Fa flags
148argument in the flags stored in
149.Fa a .
150The value of a flag neither changes when it is already set in
151.Fa a
152nor when it is unset in the
153.Fa flags
154argument.
155.Pp
156.Fn BIO_clear_flags
157clears all the bits contained in the
158.Fa flags
159argument from the flags stored in
160.Fa a .
161The value of a flag neither changes when it is already unset in
162.Fa a
163nor when it is unset in the
164.Fa flags
165argument.
166.Pp
167.Fn BIO_test_flags
168checks whether any of the bits contained in the
169.Fa flags
170argument are set in the flags stored in
171.Fa a .
172Application programs usually call macros like those documented in
173.Xr BIO_should_retry 3
174rather than calling
175.Fn BIO_test_flags
176directly.
177.Pp
122The 178The
123.Fn BIO_set_init 179.Fn BIO_set_init
124function sets the 180function sets the
@@ -166,6 +222,20 @@ or
166.Dv NULL 222.Dv NULL
167if none is set. 223if none is set.
168.Pp 224.Pp
225.Fn BIO_test_flags
226returns the bitwise OR of the
227.Fa flags
228argument and the flags stored in
229.Fa a .
230Consequently, it returns a non-zero value
231if and only if at least one of the requested
232.Fa flags
233is set.
234.Pp
235.Fn BIO_get_flags
236returns all the flags currently stored in
237.Fa a .
238.Pp
169.Fn BIO_get_init 239.Fn BIO_get_init
170returns the value of the init flag of 240returns the value of the init flag of
171.Fa a . 241.Fa a .
@@ -178,8 +248,22 @@ or with
178.Sh SEE ALSO 248.Sh SEE ALSO
179.Xr BIO_meth_new 3 , 249.Xr BIO_meth_new 3 ,
180.Xr BIO_new 3 , 250.Xr BIO_new 3 ,
181.Xr BIO_set_close 3 251.Xr BIO_set_close 3 ,
252.Xr BIO_should_retry 3
182.Sh HISTORY 253.Sh HISTORY
254.Fn BIO_set_flags
255and
256.Fn BIO_clear_flags
257first appeared in SSLeay 0.8.0 and
258.Fn BIO_get_flags
259in SSLeay 0.9.0.
260These functions have been available since
261.Ox 2.4 .
262.Pp
263.Fn BIO_test_flags
264first appeared in OpenSSL 0.9.8e and has been available since
265.Ox 4.5 .
266.Pp
183.Fn BIO_set_data , 267.Fn BIO_set_data ,
184.Fn BIO_get_data , 268.Fn BIO_get_data ,
185.Fn BIO_set_init , 269.Fn BIO_set_init ,