summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2019-07-09 17:58:33 +0000
committerjsing <>2019-07-09 17:58:33 +0000
commitb6e07c99cc5d30d75338acdc1b02d4d71b34a285 (patch)
treef540f0b9b54adf9a0bc363af2c293f8d608b3a82
parent0771cc4c395c98a51af84fc3cb9b261d5c046a6d (diff)
downloadopenbsd-b6e07c99cc5d30d75338acdc1b02d4d71b34a285.tar.gz
openbsd-b6e07c99cc5d30d75338acdc1b02d4d71b34a285.tar.bz2
openbsd-b6e07c99cc5d30d75338acdc1b02d4d71b34a285.zip
Group tls_{handshake,read,write,close}() return values documentation.
Move the documentation for tls_error() down so that both the special return values for tls_{handshake,read,write,close}() directly follow the standard return values for the same functions. Prompted by deraadt@. ok deraadt@ schwarze@
-rw-r--r--src/lib/libtls/man/tls_read.342
1 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/libtls/man/tls_read.3 b/src/lib/libtls/man/tls_read.3
index b0811f4aa0..d928975f3d 100644
--- a/src/lib/libtls/man/tls_read.3
+++ b/src/lib/libtls/man/tls_read.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: tls_read.3,v 1.6 2019/06/20 15:47:44 deraadt Exp $ 1.\" $OpenBSD: tls_read.3,v 1.7 2019/07/09 17:58:33 jsing Exp $
2.\" 2.\"
3.\" Copyright (c) 2014, 2015 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014, 2015 Ted Unangst <tedu@openbsd.org>
4.\" Copyright (c) 2015 Doug Hogan <doug@openbsd.org> 4.\" Copyright (c) 2015 Doug Hogan <doug@openbsd.org>
@@ -18,7 +18,7 @@
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\" 20.\"
21.Dd $Mdocdate: June 20 2019 $ 21.Dd $Mdocdate: July 9 2019 $
22.Dt TLS_READ 3 22.Dt TLS_READ 3
23.Os 23.Os
24.Sh NAME 24.Sh NAME
@@ -104,31 +104,13 @@ and
104.Fn tls_close 104.Fn tls_close
105return 0 on success or -1 on error. 105return 0 on success or -1 on error.
106.Pp 106.Pp
107.Fn tls_error
108returns
109.Dv NULL
110if no error occurred with
111.Fa ctx
112during or since the last call to
113.Fn tls_handshake ,
114.Fn tls_read ,
115.Fn tls_write ,
116.Fn tls_close ,
117or
118.Fn tls_reset
119involving
120.Fa ctx ,
121or if memory allocation failed while trying to assemble the string
122describing the most recent error related to
123.Fa ctx .
124.Pp
125The 107The
126.Fn tls_read , 108.Fn tls_read ,
127.Fn tls_write , 109.Fn tls_write ,
128.Fn tls_handshake , 110.Fn tls_handshake ,
129and 111and
130.Fn tls_close 112.Fn tls_close
131functions have two special return values: 113functions also have two special return values:
132.Pp 114.Pp
133.Bl -tag -width "TLS_WANT_POLLOUT" -offset indent -compact 115.Bl -tag -width "TLS_WANT_POLLOUT" -offset indent -compact
134.It Dv TLS_WANT_POLLIN 116.It Dv TLS_WANT_POLLIN
@@ -152,6 +134,24 @@ and
152.Fn tls_close 134.Fn tls_close
153all explicitly clear 135all explicitly clear
154.Ar errno . 136.Ar errno .
137.Pp
138.Fn tls_error
139returns
140.Dv NULL
141if no error occurred with
142.Fa ctx
143during or since the last call to
144.Fn tls_handshake ,
145.Fn tls_read ,
146.Fn tls_write ,
147.Fn tls_close ,
148or
149.Fn tls_reset
150involving
151.Fa ctx ,
152or if memory allocation failed while trying to assemble the string
153describing the most recent error related to
154.Fa ctx .
155.Sh EXAMPLES 155.Sh EXAMPLES
156The following example demonstrates how to handle TLS writes on a blocking 156The following example demonstrates how to handle TLS writes on a blocking
157file descriptor: 157file descriptor: