summaryrefslogtreecommitdiff
path: root/lib/libtls
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2019-07-09 17:58:34 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2019-07-09 17:58:34 +0000
commitae1c7f2dfa253170e52885258f699ceaeb56ff35 (patch)
tree7cbdd022168e07d4ec760ed671e4be2071bff6ed /lib/libtls
parent27bda5ef232824a450c7e412b3d22cae11ad7a62 (diff)
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: