summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-02-24 15:03:35 +0000
committerschwarze <>2018-02-24 15:03:35 +0000
commit133614e30799c337e9726b3e2634169cc587adc4 (patch)
tree3d0a8fcd8b4a4269b6a0fd22bffd5b786eda86b2
parent40e2b68744e48ed36d6ba8bfcb14dfc7ce9f7db8 (diff)
downloadopenbsd-133614e30799c337e9726b3e2634169cc587adc4.tar.gz
openbsd-133614e30799c337e9726b3e2634169cc587adc4.tar.bz2
openbsd-133614e30799c337e9726b3e2634169cc587adc4.zip
In bio.h rev. 1.35 2018/02/20 17:55:26, tb@ provided BIO_set_shutdown(3)
and BIO_get_shutdown(3). Write the documentation from scratch because what OpenSSL provides doesn't explain the difference to BIO_set_close(3) and is also worded in a rather confusing way.
-rw-r--r--src/lib/libcrypto/man/BIO_get_data.369
1 files changed, 64 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/BIO_get_data.3 b/src/lib/libcrypto/man/BIO_get_data.3
index 2a7543960c..aa2707de82 100644
--- a/src/lib/libcrypto/man/BIO_get_data.3
+++ b/src/lib/libcrypto/man/BIO_get_data.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: BIO_get_data.3,v 1.1 2018/02/19 14:08:52 schwarze Exp $ 1.\" $OpenBSD: BIO_get_data.3,v 1.2 2018/02/24 15:03:35 schwarze Exp $
2.\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400 2.\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400
3.\" 3.\"
4.\" This file was written by Matt Caswell <matt@openssl.org> 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2018 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 Matt Caswell <matt@openssl.org>.
5.\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. 22.\" Copyright (c) 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,13 +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: February 19 2018 $ 68.Dd $Mdocdate: February 24 2018 $
52.Dt BIO_GET_DATA 3 69.Dt BIO_GET_DATA 3
53.Os 70.Os
54.Sh NAME 71.Sh NAME
55.Nm BIO_set_data , 72.Nm BIO_set_data ,
56.Nm BIO_get_data , 73.Nm BIO_get_data ,
57.Nm BIO_set_init 74.Nm BIO_set_init ,
75.Nm BIO_set_shutdown ,
76.Nm BIO_get_shutdown
58.Nd manage BIO state information 77.Nd manage BIO state information
59.Sh SYNOPSIS 78.Sh SYNOPSIS
60.In openssl/bio.h 79.In openssl/bio.h
@@ -72,6 +91,15 @@
72.Fa "BIO *a" 91.Fa "BIO *a"
73.Fa "int init" 92.Fa "int init"
74.Fc 93.Fc
94.Ft void
95.Fo BIO_set_shutdown
96.Fa "BIO *a"
97.Fa "int shutdown"
98.Fc
99.Ft int
100.Fo BIO_get_shutdown
101.Fa "BIO *a"
102.Fc
75.Sh DESCRIPTION 103.Sh DESCRIPTION
76These functions are mainly useful when implementing a custom BIO. 104These functions are mainly useful when implementing a custom BIO.
77.Pp 105.Pp
@@ -100,6 +128,30 @@ during initial construction of the BIO.
100For some BIOs however, initialisation may not be complete until 128For some BIOs however, initialisation may not be complete until
101additional steps have been taken, for example through calling custom 129additional steps have been taken, for example through calling custom
102ctrls. 130ctrls.
131.Pp
132The
133.Fn BIO_set_shutdown
134and
135.Fn BIO_get_shutdown
136functions are low-level interfaces to forcefully set and get the
137.Fa shutdown
138flag of
139.Fa a ,
140circumventing type-dependent sanity checks,
141exclusively intended for implementing a new BIO type.
142The
143.Fa shutdown
144argument must be either
145.Dv BIO_CLOSE
146or
147.Dv BIO_NOCLOSE .
148When merely using a
149.Vt BIO
150object, call
151.Xr BIO_set_close 3
152and
153.Xr BIO_get_close 3
154instead.
103.Sh RETURN VALUES 155.Sh RETURN VALUES
104.Fn BIO_get_data 156.Fn BIO_get_data
105returns a pointer to the implementation specific custom data associated 157returns a pointer to the implementation specific custom data associated
@@ -108,8 +160,15 @@ with
108or 160or
109.Dv NULL 161.Dv NULL
110if none is set. 162if none is set.
163.Pp
164.Fn BIO_get_shutdown
165returns the value previously set with
166.Fn BIO_set_shutdown
167or with
168.Xr BIO_set_close 3 .
111.Sh SEE ALSO 169.Sh SEE ALSO
112.Xr BIO_meth_new 3 , 170.Xr BIO_meth_new 3 ,
113.Xr BIO_new 3 171.Xr BIO_new 3 ,
172.Xr BIO_set_close 3
114.Sh HISTORY 173.Sh HISTORY
115These functions first appeared in OpenSSL 1.1.0. 174These functions first appeared in OpenSSL 1.1.0.