summaryrefslogtreecommitdiff
path: root/src/lib/libtls/man/tls_init.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libtls/man/tls_init.3')
-rw-r--r--src/lib/libtls/man/tls_init.329
1 files changed, 27 insertions, 2 deletions
diff --git a/src/lib/libtls/man/tls_init.3 b/src/lib/libtls/man/tls_init.3
index 36d2e29084..b17bb814fe 100644
--- a/src/lib/libtls/man/tls_init.3
+++ b/src/lib/libtls/man/tls_init.3
@@ -1,7 +1,8 @@
1.\" $OpenBSD: tls_init.3,v 1.3 2017/01/28 00:59:36 schwarze Exp $ 1.\" $OpenBSD: tls_init.3,v 1.4 2017/02/20 13:09:15 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" Copyright (c) 2016 Joel Sing <jsing@openbsd.org> 4.\" Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
5.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
5.\" 6.\"
6.\" Permission to use, copy, modify, and distribute this software for any 7.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above 8.\" purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +16,7 @@
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\" 18.\"
18.Dd $Mdocdate: January 28 2017 $ 19.Dd $Mdocdate: February 20 2017 $
19.Dt TLS_INIT 3 20.Dt TLS_INIT 3
20.Os 21.Os
21.Sh NAME 22.Sh NAME
@@ -107,6 +108,15 @@ returns 0 on success or -1 on error.
107returns 108returns
108.Dv NULL 109.Dv NULL
109on error or an out of memory condition. 110on error or an out of memory condition.
111.Pp
112.Fn tls_config_error
113returns
114.Dv NULL
115if no error occured with
116.Fa config
117at all, or if memory allocation failed while trying to assemble the
118string describing the most recent error related to
119.Fa config .
110.Sh SEE ALSO 120.Sh SEE ALSO
111.Xr tls_accept_socket 3 , 121.Xr tls_accept_socket 3 ,
112.Xr tls_client 3 , 122.Xr tls_client 3 ,
@@ -142,3 +152,18 @@ appeared in
142.Pp 152.Pp
143Many others contributed to various parts of the library; see the 153Many others contributed to various parts of the library; see the
144individual manual pages for more information. 154individual manual pages for more information.
155.Sh CAVEATS
156The function
157.Fn tls_config_error
158returns an internal pointer.
159It must not be freed by the application, or a double free error
160will occur.
161The pointer will become invalid when the next error occurs with
162.Fa config .
163Consequently, if the application may need the message at a later
164time, it has to copy the string before calling the next
165.Sy libtls
166function involving
167.Fa config ,
168or a segmentation fault or read access to unintended data is the
169likely result.