From b6e07c99cc5d30d75338acdc1b02d4d71b34a285 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 9 Jul 2019 17:58:33 +0000 Subject: 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@ --- src/lib/libtls/man/tls_read.3 | 42 +++++++++++++++++++++--------------------- 1 file 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 @@ -.\" $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 .\" Copyright (c) 2015 Doug Hogan @@ -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: -- cgit v1.2.3-55-g6feb