summaryrefslogtreecommitdiffstats
path: root/lib/libtls
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2019-07-09 17:58:33 +0000
committerjsing <jsing@openbsd.org>2019-07-09 17:58:33 +0000
commit5719c9cb982c64f3c0ad4d33b93e1830a06d9c68 (patch)
treeec6676f639f8c6b8120aade7ad2de7a105abdc28 /lib/libtls
parentRegress realpath(3) fails since the non directory hack has been (diff)
downloadwireguard-openbsd-5719c9cb982c64f3c0ad4d33b93e1830a06d9c68.tar.xz
wireguard-openbsd-5719c9cb982c64f3c0ad4d33b93e1830a06d9c68.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@
Diffstat (limited to 'lib/libtls')
-rw-r--r--lib/libtls/man/tls_read.342
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/libtls/man/tls_read.3 b/lib/libtls/man/tls_read.3
index b0811f4aa04..d928975f3d0 100644
--- a/lib/libtls/man/tls_read.3
+++ b/lib/libtls/man/tls_read.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tls_read.3,v 1.6 2019/06/20 15:47:44 deraadt Exp $
+.\" $OpenBSD: tls_read.3,v 1.7 2019/07/09 17:58:33 jsing Exp $
.\"
.\" Copyright (c) 2014, 2015 Ted Unangst <tedu@openbsd.org>
.\" Copyright (c) 2015 Doug Hogan <doug@openbsd.org>
@@ -18,7 +18,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 20 2019 $
+.Dd $Mdocdate: July 9 2019 $
.Dt TLS_READ 3
.Os
.Sh NAME
@@ -104,31 +104,13 @@ and
.Fn tls_close
return 0 on success or -1 on error.
.Pp
-.Fn tls_error
-returns
-.Dv NULL
-if no error occurred with
-.Fa ctx
-during or since the last call to
-.Fn tls_handshake ,
-.Fn tls_read ,
-.Fn tls_write ,
-.Fn tls_close ,
-or
-.Fn tls_reset
-involving
-.Fa ctx ,
-or if memory allocation failed while trying to assemble the string
-describing the most recent error related to
-.Fa ctx .
-.Pp
The
.Fn tls_read ,
.Fn tls_write ,
.Fn tls_handshake ,
and
.Fn tls_close
-functions have two special return values:
+functions also have two special return values:
.Pp
.Bl -tag -width "TLS_WANT_POLLOUT" -offset indent -compact
.It Dv TLS_WANT_POLLIN
@@ -152,6 +134,24 @@ and
.Fn tls_close
all explicitly clear
.Ar errno .
+.Pp
+.Fn tls_error
+returns
+.Dv NULL
+if no error occurred with
+.Fa ctx
+during or since the last call to
+.Fn tls_handshake ,
+.Fn tls_read ,
+.Fn tls_write ,
+.Fn tls_close ,
+or
+.Fn tls_reset
+involving
+.Fa ctx ,
+or if memory allocation failed while trying to assemble the string
+describing the most recent error related to
+.Fa ctx .
.Sh EXAMPLES
The following example demonstrates how to handle TLS writes on a blocking
file descriptor: