diff options
| author | jsing <> | 2019-07-09 17:58:33 +0000 |
|---|---|---|
| committer | jsing <> | 2019-07-09 17:58:33 +0000 |
| commit | ee433ef57027dc35958a9c56ad878f679d66886b (patch) | |
| tree | f540f0b9b54adf9a0bc363af2c293f8d608b3a82 /src | |
| parent | 375e1a486af6cd971f8176174e0ac744db418dab (diff) | |
| download | openbsd-ee433ef57027dc35958a9c56ad878f679d66886b.tar.gz openbsd-ee433ef57027dc35958a9c56ad878f679d66886b.tar.bz2 openbsd-ee433ef57027dc35958a9c56ad878f679d66886b.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 'src')
| -rw-r--r-- | src/lib/libtls/man/tls_read.3 | 42 |
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 |
| 105 | return 0 on success or -1 on error. | 105 | return 0 on success or -1 on error. |
| 106 | .Pp | 106 | .Pp |
| 107 | .Fn tls_error | ||
| 108 | returns | ||
| 109 | .Dv NULL | ||
| 110 | if no error occurred with | ||
| 111 | .Fa ctx | ||
| 112 | during or since the last call to | ||
| 113 | .Fn tls_handshake , | ||
| 114 | .Fn tls_read , | ||
| 115 | .Fn tls_write , | ||
| 116 | .Fn tls_close , | ||
| 117 | or | ||
| 118 | .Fn tls_reset | ||
| 119 | involving | ||
| 120 | .Fa ctx , | ||
| 121 | or if memory allocation failed while trying to assemble the string | ||
| 122 | describing the most recent error related to | ||
| 123 | .Fa ctx . | ||
| 124 | .Pp | ||
| 125 | The | 107 | The |
| 126 | .Fn tls_read , | 108 | .Fn tls_read , |
| 127 | .Fn tls_write , | 109 | .Fn tls_write , |
| 128 | .Fn tls_handshake , | 110 | .Fn tls_handshake , |
| 129 | and | 111 | and |
| 130 | .Fn tls_close | 112 | .Fn tls_close |
| 131 | functions have two special return values: | 113 | functions 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 |
| 153 | all explicitly clear | 135 | all explicitly clear |
| 154 | .Ar errno . | 136 | .Ar errno . |
| 137 | .Pp | ||
| 138 | .Fn tls_error | ||
| 139 | returns | ||
| 140 | .Dv NULL | ||
| 141 | if no error occurred with | ||
| 142 | .Fa ctx | ||
| 143 | during or since the last call to | ||
| 144 | .Fn tls_handshake , | ||
| 145 | .Fn tls_read , | ||
| 146 | .Fn tls_write , | ||
| 147 | .Fn tls_close , | ||
| 148 | or | ||
| 149 | .Fn tls_reset | ||
| 150 | involving | ||
| 151 | .Fa ctx , | ||
| 152 | or if memory allocation failed while trying to assemble the string | ||
| 153 | describing the most recent error related to | ||
| 154 | .Fa ctx . | ||
| 155 | .Sh EXAMPLES | 155 | .Sh EXAMPLES |
| 156 | The following example demonstrates how to handle TLS writes on a blocking | 156 | The following example demonstrates how to handle TLS writes on a blocking |
| 157 | file descriptor: | 157 | file descriptor: |
