diff options
author | 2015-02-21 19:54:59 +0000 | |
---|---|---|
committer | 2015-02-21 19:54:59 +0000 | |
commit | 0508595c261f031c8aa33d205d29ad27d5be678b (patch) | |
tree | d0357c7bc06743da5c85ea3c4c1379f69ddec978 /lib/libtls/tls_init.3 | |
parent | Escape quotes when expanding macro arguments. (diff) | |
download | wireguard-openbsd-0508595c261f031c8aa33d205d29ad27d5be678b.tar.xz wireguard-openbsd-0508595c261f031c8aa33d205d29ad27d5be678b.zip |
fill out docs a bit more, notably the read/write again behaviors.
ok jsing
Diffstat (limited to 'lib/libtls/tls_init.3')
-rw-r--r-- | lib/libtls/tls_init.3 | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/lib/libtls/tls_init.3 b/lib/libtls/tls_init.3 index 61614ca2397..de87119f335 100644 --- a/lib/libtls/tls_init.3 +++ b/lib/libtls/tls_init.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tls_init.3,v 1.14 2015/02/15 13:36:06 jsing Exp $ +.\" $OpenBSD: tls_init.3,v 1.15 2015/02/21 19:54:59 tedu Exp $ .\" .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> .\" @@ -14,7 +14,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: February 15 2015 $ +.Dd $Mdocdate: February 21 2015 $ .Dt TLS 3 .Os .Sh NAME @@ -135,6 +135,7 @@ Both clients and servers are supported. The .Fn tls_init function should be called once before any function is used. +It may be called more than once, but not concurrently. .Pp Before a connection is created, a configuration must be created. The @@ -381,7 +382,30 @@ Functions that return .Vt int will return 0 on success and -1 on error. Functions that return a pointer will return NULL on error. -.\" .Sh ERRORS +.Pp +The +.Fn tls_read +and +.Fn tls_write +functions and the +.Fn tls_connect +family of functions have two special return values. +.Pp +.Bl -tag -width "TLS_WRITE_AGAIN" -offset indent -compact +.It Dv TLS_READ_AGAIN +A read operation is necessary to continue. +.It Dv TLS_WRITE_AGAIN +A write operation is necessary to continue. +.El +.Pp +The caller should call the appropriate function, or in the case of +.Fn tls_connect , +repeat the call. +.Sh ERRORS +The +.Fn tls_error +function may be used to retrieve a string containing more information +about the most recent error. .\" .Sh SEE ALSO .Sh HISTORY The |